A (simple) way to bootstrap a TypeScript playground equipped with ESLint, Jest, Babel & Parcel
Just ensure that Node packages are installed properly by running:
$ npm install
or
$ yarn install
The playground is already equipped with Jest and compatible with TypeScript,
hence all the tests which are placed under __tests__
folders with naming convention of <moduleName>.spec.ts
will be triggered with a single NPM script:
$ npm run test
or
$ yarn test
Like Jest, Parcel is already equipped because of its simplicity and ease of use (over Webpack)
There're two steps of packaging:
- Compile TypeScript into JavaScript using
tsconfig.build.json
configurations - Bundle all the output files into a single one (along with mapping file) with Parcel
All should be done using the built-in script:
$ npm run build
or
$ yarn build