@dizmo/generator-component

1.2.21 • Public • Published

NPM version Build Status

@dizmo/generator-component

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

Prerequisites

Installation

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

Help

yo @dizmo/component --help

Generation

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

Upgrade

npm upgrade --global @dizmo/generator-component
yo @dizmo/component --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-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.main
entry: {
    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 symlink

Documentation

npm run docs

Publication

npm publish

initially (if public):

npm publish --access=public

Copyright

© dizmo AG, Switzerland

Package Sidebar

Install

npm i @dizmo/generator-component

Weekly Downloads

1

Version

1.2.21

License

ISC

Unpacked Size

50.6 kB

Total Files

32

Last publish

Collaborators

  • dizmo-user
  • hsk81