UNPKG

836 BMarkdownView Raw
1### Package file generation
2
3This tasks does lots of work to install handful of packages and update `package.json` file.
4
5The list of operations is based on my personal learnings while maintaining open source projects.
6
7#### Testing
8
9The [japa](https://github.com/thetutlage/japa) test runner is installed along side with `japaFile.js`.
10
11#### Typescript setup
12
13We create a `tsconfig.json` file and install following dependencies.
14
151. `@types/node`
162. `typescript`
173. `@adonisjs/require-ts`
18
19#### Scripts
20The following scripts are defined inside the `package.json` file.
21
221. `clean` to clean the build folder before starting the build. We also install `del-cli` npm package for this script to work
232. `compile` to compile the TypeScript code to JavaScript
243. `build` runs compile
254. `prePublishOnly` to compile before publishing to npm.