A slush generator for Node.js and TypeScript.
npm install slush-node-typescript> A slush generator for Node.js and TypeScript.
Install slush-node-typescript globally:
``bash`
$ npm i -g slush-node-typescript
Remember to install slush globally as well, if you haven't already:
`bash`
$ npm i -g slush
Create a new folder for your node esnext package. Then cd into it.
`bash`
$ mkdir node-typescript-package && cd node-typescript-package
Initiate the generator:
`bash`
$ slush node-typescript
#### generate
`bash`
$ slush node-typescript:generate foo/bar
Will generate src/foo/bar.ts and test/src/foo/bar_test.ts to your package.
The generator expects a few conventions. They are easy to change if they are not suitable.
* Source code for your npm package is in the src directory.test
* Test code is in the directory.lib
* Compiled JavaScript code is outputed to the directory.main
* The package module is located at lib/{packageName}.js`.
Slush is a tool that uses Gulp for project scaffolding.
Slush does not contain anything "out of the box", except the ability to locate installed slush generators and to run them with liftoff.
To find out more about Slush, check out the documentation.
MIT