A generator for JavaScript, CoffeeScript and TypeScript web components
Generates NPM compatible web components' 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 (
deborrpm) see also binary distributions.
npm install -g yonpm install -g @dizmo/generator-componentyo @dizmo/component --helpyo @dizmo/component [--git] [--coffeescript|--typescript]npm upgrade --global @dizmo/generator-componentyo @dizmo/component --upgrade --skip-installnpm install && npm audit fixnpm run cleannpm run buildnpm run -- build --no-lint --no-cleannpm run -- build --prepacknpm run -- build --prepack --no-minifynpm run lintnpm run -- lint --fixnpm run testnpm run -- test --no-lint --no-clean --no-buildnpm run covernpm run -- cover --no-lint --no-clean --no-buildConnect my-component to another project:
[my-component] $ npm link # symlink global:my-component[a-project] $ npm link a-module # symlink node-modules:my-component[a-project] $ head webpack.config.js # ensure my-component in entry.mainentry: {
main: [..., 'my-component', './source/index.js']
}
Disconnect my-component from the project:
[a-project] $ npm unlink my-component # delete local symlink[my-component] $ npm uninstall -g # delete global symlinknpm run docsnpm publishnpm publish --access=public© dizmo AG, Switzerland