generator-open-wc v0.7.3
Generator Open WC
Part of Open Web Components
Open Web Components provides a set of defaults, recommendations and tools to help facilitate your web component project. Our recommendations include: developing, linting, testing, building, tooling, demoing, publishing and automating.
Usage
This generator is based on yeoman. Simply use it like this:
# in a new or existing folder:
npm init yo open-wc
# requires npm 6 or higherFor running specific generators you can do as demonstrated:
npm i -g yeoman
npm i -g generator-open-wc
yo open-wc:{generator-name}or
npx -p yo -p generator-open-wc -c 'yo open-wc:{generator-name}'Scaffold generators
These generators help you kickstart a web component. You can use these in an empty folder to set up everything you need to get started immediately.
Example usage:
mkdir foo-bar
cd foo-bar
yo open-wc:scaffold-vanilla
# this will scaffold a new web component + run all available scaffold generatorsAvailable application generators:
yo open-wc:starter-appThis generator scaffolds a new starter application. We recommend using this generator at the start of your web component project.- open-wc:bundling-webpack - open-wc:testing - open-wc:linting - A frontend setup
Available scaffold generators:
yo open-wc:scaffold-vanillaThis generator scaffolds a new web component project for you with all of our recommendations. We recommend using this generator at the start of your web component project.- open-wc:linting - open-wc:scaffold-testing - open-wc:scaffold-demoing - open-wc:automatingyo open-wc:scaffold-buildingThis generator scaffolds a webpack configuration for you with examples to your existing project.- open-wc:building-webpack - Plus an index.html and index.js using the [@open-wc/polyfills-loader](https://www.npmjs.com/package/@open-wc/polyfills-loader)yo open-wc:scaffold-demoingThis generator scaffolds a Storybook setup for you with examples to your existing project.- open-wc:demoing - Plus Storybook examplesyo open-wc:scaffold-testingThis generator scaffolds a Karma setup for you with examples to your existing project.- open-wc:testing - Plus example tests
Upgrade generators
These generators help you to align your current project with the open-wc recommendations.
You can use these to add to an existing project that already contains code for your web component.
Example usage:
cd existing-web-component
yo open-wc:upgrade
# this will execute all available upgrade generatorsAvailable upgrade generators
yo open-wc:lintingThis generator adds a complete linting setup with ESLint, Prettier, Husky and commitlint to your existing project.- open-wc:linting-eslint - open-wc:linting-prettier - open-wc:linting-commitlint
yo open-wc:buildingThis generator adds a complete building setup with webpack to your existing project.- open-wc:building-webpack
yo open-wc:testingThis generator adds a complete testing setup with Karma, and Karma Browserstack to your existing project.- open-wc:testing-karma - open-wc:testing-karma-bs
yo open-wc:demoingThis generator adds a complete demoing setup with Storybook to your existing project.- open-wc:demoing-storybook
yo open-wc:automatingThis generator adds a complete automating setup with CircleCi to your existing project.- open-wc:automating-circleci
Optional upgrade generators
These generators are not executed with the default upgrade generator.
yo open-wc:testing-wallabyThis will set up Wallaby to enable testing directly in your IDE. For more information, see testing-wallaby.
Sub generators
These generators are executed with the default upgrade generator. You can use these generators if you already have an existing project that you would like to add to.
yo open-wc:building-webpackThis generator adds a build configuration with Webpack to your existing project.yo open-wc:linting-eslintThis generator adds linting with ESLint to your existing project.
yo open-wc:linting-prettierThis generator adds code formatting with Prettier to your existing project.
yo open-wc:linting-commitlintThis generator adds linting to your git commits with commitlint to your existing project.
yo open-wc:testing-karmaThis generator adds a testing setup with Karma to your existing project.
yo open-wc:testing-karma-bsThis generator adds a testing setup with Karma and Browserstack to your existing project. This generator requires a manual step of adding your Browserstack credentials to your.bashrc. For more information, see this page.
yo open-wc:automating-circleciThis generator adds continuous integration with CircleCi to your existing project.
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago