Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dizmo/yeoman-generator-component
@dizmo/component: a web component generator for JavaScript, CoffeeScript and TypeScript
https://github.com/dizmo/yeoman-generator-component
coffeescript component generator javascript node typescript
Last synced: 18 days ago
JSON representation
@dizmo/component: a web component generator for JavaScript, CoffeeScript and TypeScript
- Host: GitHub
- URL: https://github.com/dizmo/yeoman-generator-component
- Owner: dizmo
- License: isc
- Created: 2020-12-31T20:44:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T16:24:01.000Z (9 months ago)
- Last Synced: 2024-11-08T10:12:12.664Z (2 months ago)
- Topics: coffeescript, component, generator, javascript, node, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@dizmo/generator-component
- Size: 411 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGE_LOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![NPM version](https://badge.fury.io/js/%40dizmo%2Fgenerator-component.svg)](https://npmjs.org/package/@dizmo/generator-component)
[![Build Status](https://travis-ci.com/dizmo/yeoman-generator-component.svg?branch=master)](https://travis-ci.com/dizmo/yeoman-generator-component)# @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
* [Node.js] v14.15.5 LTS (or higher); for Linux distribution based packages (`deb` or `rpm`) see also [binary distributions](https://github.com/nodesource/distributions).
## Installation
```sh
npm install -g yo
``````sh
npm install -g @dizmo/generator-component
```## Help
```sh
yo @dizmo/component --help
```## Generation
```sh
yo @dizmo/component [--git] [--coffeescript|--typescript]
```## Upgrade
```sh
npm upgrade --global @dizmo/generator-component
``````sh
yo @dizmo/component --upgrade --skip-install
``````sh
npm install && npm audit fix
```## Development
### Clean
```sh
npm run clean
```### Build
```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
```### Lint
```sh
npm run lint
```#### with auto-fixing:
```sh
npm run -- lint --fix
```### Test
```sh
npm run test
```#### without linting, cleaning and (re-)building:
```sh
npm run -- test --no-lint --no-clean --no-build
```### Cover
```sh
npm run cover
```#### without linting, cleaning and (re-)building:
```sh
npm run -- cover --no-lint --no-clean --no-build
```## Debugging
Connect `my-component` to another project:
```sh
[my-component] $ npm link # symlink global:my-component
``````sh
[a-project] $ npm link a-module # symlink node-modules:my-component
``````sh
[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:
```sh
[a-project] $ npm unlink my-component # delete local symlink
``````sh
[my-component] $ npm uninstall -g # delete global symlink
```## Documentation
```sh
npm run docs
```## Publication
```sh
npm publish
```#### initially (if `public`):
```sh
npm publish --access=public
```## Copyright
© [dizmo AG](http://dizmo.com/), Switzerland
[Node.js]: https://nodejs.org
[NPM]: https://www.npmjs.com
[web components]: https://developer.mozilla.org/en-US/docs/Web/Web_Components