@dizmo/generator-module

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

Stats

StarsIssuesVersionUpdatedCreatedSize
@dizmo/generator-module
012.4.338 months ago4 years agoMinified + gzip package size for @dizmo/generator-module in KB

Readme

NPM version Build Status

@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).

Prerequisites

Installation

npm install -g yo
npm install -g @dizmo/generator-module

Help

yo @dizmo/module --help

Generation

yo @dizmo/module [--git] [--typescript|--coffeescript]

Upgrade

npm upgrade --global @dizmo/generator-module
yo @dizmo/module --upgrade --skip-install
npm install && npm audit fix

Development

Clean

npm run clean

Build

npm run build

without linting and cleaning:

npm run -- build --no-lint --no-clean

with UMD bundling (incl. minimization):

npm run -- build --prepack

with UMD bundling (excl. minimization):

npm run -- build --prepack --no-minify

Lint

npm run lint

with auto-fixing:

npm run -- lint --fix

Test

npm run test

without linting, cleaning and (re-)building:

npm run -- test --no-lint --no-clean --no-build

Cover

npm run cover

without linting, cleaning and (re-)building:

npm run -- cover --no-lint --no-clean --no-build

Debugging

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

Documentation

npm run docs

Publication

npm publish

initially (if public):

npm publish --access=public

Copyright

© dizmo AG, Switzerland

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.