Add the Polymer CLI as devdepency

This commit is contained in:
Abdón Rodríguez Davila
2018-04-18 19:17:34 +02:00
parent 6cc66676f9
commit fecc150576
3 changed files with 14655 additions and 5 deletions

View File

@@ -45,18 +45,18 @@ Install [Polymer CLI](https://github.com/Polymer/polymer-cli) using
mkdir my-app
cd my-app
polymer init polymer-2-starter-kit
polymer init polymer-3-starter-kit
### Start the development server
This command serves the app at `http://127.0.0.1:8081` and provides basic URL
routing for the app:
polymer serve
npm start
### Build
The `polymer build` command builds your Polymer application for production, using build configuration options provided by the command line or in your project's `polymer.json` file.
The `npm run build` command builds your Polymer application for production, using build configuration options provided by the command line or in your project's `polymer.json` file.
You can configure your `polymer.json` file to create multiple builds. This is necessary if you will be serving different builds optimized for different browsers. You can define your own named builds, or use presets. See the documentation on [building your project for production](https://www.polymer-project.org/2.0/toolbox/build-for-production) for more information.
@@ -79,14 +79,14 @@ Run `polymer help build` for the full list of available options and optimization
This command serves your app. Replace `build-folder-name` with the folder name of the build you want to serve.
polymer serve build/build-folder-name/
npm start build/build-folder-name/
### Run tests
This command will run [Web Component Tester](https://github.com/Polymer/web-component-tester)
against the browsers currently installed on your machine:
polymer test
npm test
If running Windows you will need to set the following environment variables:

14647
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,6 +6,8 @@
"license": "BSD-3-Clause",
"repository": "Polymer/polymer-starter-kit",
"scripts": {
"start": "polymer serve",
"build": "polymer build",
"lint": "npm run lint:javascript && polymer lint",
"lint:javascript": "eslint . --ext js,html --ignore-path .gitignore",
"test": "polymer test",
@@ -27,6 +29,7 @@
"eslint": "^3.19.0",
"eslint-config-google": "^0.7.0",
"eslint-plugin-html": "^2.0.0",
"polymer-cli": "^1.7.0-pre.11",
"wct-browser-legacy": "^0.0.1-pre.12"
}
}