A command-line toolkit to manage a Node.js package written in TypeScript.
Includes build, clean, lint, test, dev, and prepublish scripts out-of-the box.
Intended to work with zmey-gorynych, a Node.js package versioning and publishing tool.
Initialize a new Node.js package and install the toolkit with npm:
cd your-package
npm init -y
npm i -D @sompylasar/ts-build-tools
or with yarn:
cd your-package
yarn init -y
yarn add --dev @sompylasar/ts-build-tools
Scaffold the package file structure and update the package.json to include the necessary file references, dependencies, and scripts.
Produce JavaScript in the lib directory via tsc.
Removes the lib and coverage directories.
Runs tslint.
Run the tests via nyc, mocha, and ts-node.
Run the application in the source code watch and hot reload mode via tsc --watch.
- The toolkit in some aspects relies on the
node_modulesstructure, so it may not work withnode_modules-less setups like Yarn PnP and NPM Tink.