@telokys/easy-typescript
v2.0.9
Published
Easily enables typescript for the current project
Readme
easy-typescript
This project is heavily opinionated
Simply initialize a project to enable TypeScript.
Run npx @telokys/easy-typescript and answer the questions to guide the setup.
Process
This script will do the following steps:
- Update your
package.jsonto add custom scripts and update themainandtypesproperties. (See the changes) - Install the dev dependencies required to enable TypeScript (See the list)
- Create a
tsconfig.jsonfile. (See the content) - Create a
.babelrc.jsfile. (See the content)
Options
yes
Passing --yes to the program will skip the prompts and act as if you had answered yes to them all.
Tests
If you want to setup tests for your project, you simply need to npm install -D jest.
Your test files should be inside a tests directory (possibly nested) with the suffix .test.js or .test.ts.
Once you're done, you can use npm run test, npm run test:coverage or npm run test:silent to run your tests.
