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
orrpm
) see also binary distributions.
npm install -g yo
npm install -g @dizmo/generator-module
yo @dizmo/module --help
yo @dizmo/module [--git] [--typescript|--coffeescript]
npm upgrade --global @dizmo/generator-module
yo @dizmo/module --upgrade --skip-install
npm install && npm audit fix
npm run clean
npm run build
npm run -- build --no-lint --no-clean
npm run -- build --prepack
npm run -- build --prepack --no-minify
npm run lint
npm run -- lint --fix
npm run test
npm run -- test --no-lint --no-clean --no-build
npm run cover
npm run -- cover --no-lint --no-clean --no-build
Connect my-module
to another project:
[my-module] $ npm link # symlink global:my-module
[a-project] $ npm link my-module # symlink node-modules:my-module
[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:
[a-project] $ npm unlink my-module # delete local symlink
[my-module] $ npm uninstall -g # delete global symlink
npm run docs
npm publish
npm publish --access=public
© dizmo AG, Switzerland