@dizmo/module: a module generator for JavaScript, CoffeeScript and TypeScript
npm install @dizmo/generator-module

> Generator for [Node.js] JavaScript, CoffeeScript and TypeScript modules
Generates [NPM] compatible module projects that can be published, installed and even upgraded. The supported development steps are cleaning, linting, building (including bundling) and testing (including coverage statistics).
* [Node.js] v14.15.5 LTS (or higher); for Linux distribution based packages (deb or rpm) see also binary distributions.
``sh`
npm install -g yo
`sh`
npm install -g @dizmo/generator-module
`sh`
yo @dizmo/module --help
`sh`
yo @dizmo/module [--git] [--typescript|--coffeescript]
`sh`
npm upgrade --global @dizmo/generator-module
`sh`
yo @dizmo/module --upgrade --skip-install
`sh`
npm install && npm audit fix
`sh`
npm run clean
`sh`
npm run build
#### without linting and cleaning:
`sh`
npm run -- build --no-lint --no-clean
#### with UMD bundling (incl. minimization):
`sh`
npm run -- build --prepack
#### with UMD bundling (excl. minimization):
`sh`
npm run -- build --prepack --no-minify
`sh`
npm run lint
#### with auto-fixing:
`sh`
npm run -- lint --fix
`sh`
npm run test
#### without linting, cleaning and (re-)building:
`sh`
npm run -- test --no-lint --no-clean --no-build
`sh`
npm run cover
#### without linting, cleaning and (re-)building:
`sh`
npm run -- cover --no-lint --no-clean --no-build
Connect my-module to another project:
`sh`
[my-module] $ npm link # symlink global:my-module
`sh`
[a-project] $ npm link my-module # symlink node-modules:my-module
`sh`
[a-project] $ head webpack.config.js # ensure my-module in entry.main
``
entry: {
main: [..., 'my-module', './source/index.js']
}
Disconnect my-module from the project:
`sh`
[a-project] $ npm unlink my-module # delete local symlink
`sh`
[my-module] $ npm uninstall -g # delete global symlink
`sh`
npm run docs
`sh`
npm publish
#### initially (if public):
`sh``
npm publish --access=public
© dizmo AG, Switzerland
[Node.js]: https://nodejs.org
[NPM]: https://www.npmjs.com