We want to provide a good set of default on how to facilitate your web component.
mkdir my-element
cd my-element
# Default recommendation
npx -p yo -p generator-open-wc -c 'yo open-wc:vanilla'
You can also pick and choose to apply them at any point later.
- Vanilla Web Component
npx -p yo -p generator-open-wc -c 'yo open-wc:vanilla-bare'
- Testing Helpers
npx -p yo -p generator-open-wc -c 'yo open-wc:testing-bare'
- Automated Testing with Karma
npx -p yo -p generator-open-wc -c 'yo open-wc:testing-karma'
- Automated Testing via Karma and Browserstack
npx -p yo -p generator-open-wc -c 'yo open-wc:testing-karma-bs'
- Linting with ESLint
npx -p yo -p generator-open-wc -c 'yo open-wc:lint-eslint'
- Publish with Storybook
npx -p yo -p generator-open-wc -c 'yo open-wc:publish-storybook'
- Continous Integration with CircleCi
npx -p yo -p generator-open-wc -c 'yo open-wc:publish-storybook'
- Instant Testing in IDE with Wallaby
npx -p yo -p generator-open-wc -c 'yo open-wc:testing-wallaby'
npm run bootstrap
# does: lerna bootstrap --hoist
# linting
npm run lint
# local testing
npm run test
# testing via browserstack
npm run test:bs
# run commands only for a specific scope
lerna run <command> --scope @open-wc/<package-name> --stream