vegidio / tutorial-rabbitmq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript (Template)

GitHub Actions TypeScript ISC License

A template project for TypeScript with the usual scripts to run, lint, build and test the source code.

πŸ€– Usage

Clone the repository and in the project directory install its dependencies by running yarn in the terminal. Afterwards you can run the following scripts:

  • yarn build: to create an app bundle. The entry point is the file ./src/index.ts and the resolving binary will be saved in ./build/app.bundle.js.
  • yarn lint: to statically check the code with ESLint.
  • yarn start: to execute the code. The entry point is the file .src/index.ts.
  • yarn test: to run the tests specified in the folder ./test.

🧩 Dependencies

This template depends on a few Node packages in order to work. All dependencies under the devDependencies scope are mandatory; the most notable ones are:

  • eslint: a tool for identifying and reporting problems in TypeScript code.
  • jest: a JavaScript test framework.
  • ts-node: a TypeScript execution environment.
  • typescript: the TypeScript language support.
  • webpack: a module bundler for JavaScript.

πŸ—‚ Directory Structure

This project follows the directory structure below:

[root]
  β”œβ”€β”€ build/
  β”œβ”€β”€ src/
  β”‚   └── index.ts
  └── test/

where:

  • build/: is the directory containing the binaries created by the project. This folder is auto-generated and you shouldn't manually put any file here.
  • src/: is the directory where you will place the project code. The entry point of the project's execution is the file index.ts.
  • test/: is the directory where you will place your test scripts.

Important Files

  • .eslintrc: ESLint configuration file; you can change the linting rules here.
  • jest.config.js: Jest configuration file; you can change the test parameters here.
  • tsconfig.json: TypeScript configuration file; you can change how TypeScript transpile the files here.
  • types.d.ts: File where you create the definitions for the JS modules that don't have TypeScript support.
  • webpack.config.ts: Webpack configuration file; you can change how the project bundle is created here.

πŸ“ License

TypeScript (Template) is released under the ISC License. See LICENSE for details.

πŸ‘¨πŸΎβ€πŸ’» Author

Vinicius Egidio (vinicius.io)

About

License:ISC License


Languages

Language:TypeScript 94.3%Language:JavaScript 5.7%