mirror of
https://github.com/jlengrand/open-wc.git
synced 2026-03-10 08:31:19 +00:00
docs: change generator scripts
This commit is contained in:
25
README.md
25
README.md
@@ -12,18 +12,19 @@ Open Web Components provides a set of defaults, recommendations and tools to hel
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
# in a new or existing folder:
|
||||
npm init @open-wc
|
||||
# requires node 10 & npm 6 or higher
|
||||
```
|
||||
|
||||
# scaffold a complete new component
|
||||
mkdir my-element
|
||||
cd my-element
|
||||
# Default development recommendation
|
||||
yo open-wc:scaffold-vanilla
|
||||
|
||||
# upgrade/align your existing web component with 'open-wc' recommendations
|
||||
cd existing-web-component
|
||||
yo open-wc
|
||||
This will kickstart a menu guiding you through all available actions.
|
||||
```
|
||||
$ npm init @open-wc
|
||||
npx: installed 14 in 4.074s
|
||||
What would you like to do today?
|
||||
> Scaffold a new project
|
||||
Upgrade an existing project
|
||||
Nah, I am fine thanks! => exit
|
||||
```
|
||||
|
||||
## Homepage
|
||||
@@ -75,7 +76,7 @@ npm run lint
|
||||
npm run test
|
||||
|
||||
# testing via browserstack
|
||||
npm run test:bs
|
||||
npm run test:es5:bs
|
||||
|
||||
# run commands only for a specific scope
|
||||
lerna run <command> --scope @open-wc/<package-name> --stream
|
||||
|
||||
@@ -14,7 +14,7 @@ const sidebar = [
|
||||
children: [
|
||||
['/developing/', 'Getting started'],
|
||||
'/developing/owc-dev-server',
|
||||
['/developing/generator', 'Generators'],
|
||||
['/developing/create', 'Generators'],
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -12,10 +12,7 @@ This is part of the default [open-wc](https://open-wc.org/) recommendation.
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
yo open-wc:automating
|
||||
npm init @open-wc automating
|
||||
```
|
||||
|
||||
### Manual Setup
|
||||
|
||||
1
docs/developing/create.md
Symbolic link
1
docs/developing/create.md
Symbolic link
@@ -0,0 +1 @@
|
||||
../../packages/create/README.md
|
||||
@@ -1 +0,0 @@
|
||||
../../packages/generator-open-wc/README.md
|
||||
@@ -4,14 +4,12 @@ The goal of Open Web Components is to empower everyone with a powerful and battl
|
||||
|
||||
## Quickstart
|
||||
|
||||
This will bootstrap a vanilla Web Component project based on our latest recommendations.
|
||||
This will kickstart a menu guiding you through all available Open Web Components actions.
|
||||
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
# in a new or existing folder:
|
||||
yo open-wc
|
||||
npm init @open-wc
|
||||
# requires node 10 & npm 6 or higher
|
||||
```
|
||||
|
||||
## Available Recommendations
|
||||
|
||||
@@ -10,10 +10,7 @@ We recommend
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
yo open-wc:linting
|
||||
npm init @open-wc linting
|
||||
```
|
||||
|
||||
::: tip Info
|
||||
|
||||
@@ -9,6 +9,12 @@ Our configuration lets you write code using modern javascript syntax and feature
|
||||
|
||||
See the extending section for more customization, such as supporting non-standard syntax or adding babel plugins.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
npm init @open-wc building-rollup
|
||||
```
|
||||
|
||||
## Manual setup
|
||||
|
||||
1. Install the required dependencies:
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
## Default configuration
|
||||
We provide default configuration to help you get started building your web component project with webpack.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
npm init @open-wc building-webpack
|
||||
```
|
||||
|
||||
## Manual setup
|
||||
To set up the default configuration manually:
|
||||
|
||||
|
||||
@@ -7,18 +7,15 @@
|
||||
|
||||
## Open-wc Starter App
|
||||
|
||||
[](https://github.com/open-wc)
|
||||
[](https://github.com/open-wc)
|
||||
|
||||
## Quickstart
|
||||
|
||||
To get started:
|
||||
|
||||
```sh
|
||||
# in a new folder:
|
||||
npm init yo open-wc
|
||||
# requires npm 6 or higher
|
||||
|
||||
npm run start
|
||||
npm init @open-wc starter-app
|
||||
# requires node 10 & npm 6 or higher
|
||||
```
|
||||
|
||||
<p align="center">
|
||||
|
||||
@@ -18,7 +18,7 @@ This is part of the default [open-wc](https://open-wc.org/) recommendation
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm init open-wc demoing
|
||||
npm init @open-wc demoing
|
||||
```
|
||||
|
||||
### Manual
|
||||
|
||||
@@ -6,10 +6,7 @@ Use [ESLint](https://eslint.org/) to lint your es6 code.
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
yo open-wc:linting-eslint
|
||||
npm init @open-wc linting-eslint
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
@@ -10,10 +10,7 @@ This is part of the default [open-wc](https://open-wc.org/) recommendation
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
yo open-wc:linting-prettier
|
||||
npm init @open-wc linting-prettier
|
||||
```
|
||||
|
||||
## Manual
|
||||
|
||||
@@ -15,10 +15,8 @@ This is part of the default [open-wc](https://open-wc.org/) recommendation
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
npm init @open-wc testing-karma-bs
|
||||
|
||||
yo open-wc:testing-karma-bs
|
||||
# follow Setup user + key
|
||||
```
|
||||
|
||||
|
||||
@@ -31,10 +31,7 @@ The intention of the presets is to be able to write browser runnable code, with
|
||||
|
||||
### Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
yo open-wc:testing-karma
|
||||
npm init @open-wc testing-karma
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
@@ -9,10 +9,7 @@ Using:
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
yo open-wc:testing-wallaby
|
||||
npm init @open-wc testing-wallaby
|
||||
```
|
||||
|
||||
### Manual
|
||||
|
||||
@@ -18,14 +18,7 @@ This is part of the default [open-wc](https://open-wc.org/) recommendation
|
||||
|
||||
## Setup
|
||||
```bash
|
||||
npm i -g yo
|
||||
npm i -g generator-open-wc
|
||||
|
||||
# if you already have a Web Component project set up and/or test files
|
||||
yo open-wc:testing
|
||||
|
||||
# if you do not have tests yet - will run the above + some example test files
|
||||
yo open-wc:scaffold-testing
|
||||
npm init @open-wc testing
|
||||
```
|
||||
|
||||
### Manual
|
||||
@@ -43,11 +36,11 @@ This will have the following side effects:
|
||||
- Enables cleanup after each test for all `fixture`s
|
||||
|
||||
## Automating Tests
|
||||
Ideally, you'll want some way of automatically running all of your tests. To do that, we recommend karma via `@open-wc/testing-karma` and browserstack via `@open-wc/testing-karma-bs`.
|
||||
Ideally, you'll want some way of automatically running all of your tests. To do that, we recommend karma via `@open-wc/testing-karma` and browserstack via `@open-wc/testing-karma-bs`.
|
||||
If you use a different test runner or a different browser grid you may skip these steps.
|
||||
|
||||
::: tip Note
|
||||
Already part of `yo open-wc:testing`
|
||||
Already part of `npm init @open-wc testing`
|
||||
::::
|
||||
|
||||
### Manual Install
|
||||
@@ -78,7 +71,7 @@ If you do not have access to all browsers, we recommend using a service like [Br
|
||||
The following step connects the automatic karma runner with browserstack.
|
||||
|
||||
::: tip Note
|
||||
Already part of `yo open-wc:testing`
|
||||
Already part of `npm init @open-wc testing`
|
||||
::::
|
||||
|
||||
### Manual Install
|
||||
|
||||
Reference in New Issue
Block a user