Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #508

Merged
merged 1 commit into from
Jun 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ The command-line tool for Polymer projects and Web Components.
## Features

- **init** - Create a new Polymer project from pre-configured starter templates
- **install** - Install dependencies and [dependency variants](https://www.polymer-project.org/2.0/docs/glossary#dependency-variants) via Bower
- **install** - Install dependencies and [dependency variants](https://www.polymer-project.org/3.0/docs/glossary#dependency-variants) via Bower
- **serve** - Serve elements and applications during development
- **lint** - Lint a project to find and diagnose errors quickly
- **test** - Test your project with [`web-component-tester`](https://github.com/Polymer/web-component-tester/)
- **build** - Build an application optimized for production
- **analyze** - Generate an analyzed JSON representation of your element or application

> **For a detailed overview of the CLI, how it works and when to use it, check out the official
[Polymer CLI guide](https://www.polymer-project.org/2.0/docs/tools/polymer-cli).**
[Polymer CLI guide](https://www.polymer-project.org/3.0/docs/tools/polymer-cli).**
> This README will focus on the individual CLI commands and how to run them.


Expand All @@ -39,15 +39,15 @@ When developing a web application, defining some configuration is recommended. S

Here's a brief summary of the configuration options you can use to describe your web application structure:

- [`entrypoint`](https://www.polymer-project.org/2.0/docs/tools/polymer-json#entrypoint) (Defaults to `index.html`): The main entrypoint to your app.
- [`shell`](https://www.polymer-project.org/2.0/docs/tools/polymer-json#shell) (Optional): The app shell.
- [`fragments`](https://www.polymer-project.org/2.0/docs/tools/polymer-json#fragments) (Optional): A list of other entrypoints into your application.
- [`entrypoint`](https://www.polymer-project.org/3.0/docs/tools/polymer-json#entrypoint) (Defaults to `index.html`): The main entrypoint to your app.
- [`shell`](https://www.polymer-project.org/3.0/docs/tools/polymer-json#shell) (Optional): The app shell.
- [`fragments`](https://www.polymer-project.org/3.0/docs/tools/polymer-json#fragments) (Optional): A list of other entrypoints into your application.
- `root` (Defaults to current working directory): The web root of your application, can be a subfolder of your project directory.
- `sources` (Defaults to `src/**/*`): The source files in your application.

Configuration can be passed to all commands via global CLI flags: `--entrypoint`, `--shell`, etc. However we recommend saving your configuration to a `polymer.json` configuration file in your project. This guarantees a single shared configuration that will be read automatically for every command. Other project settings, like build and lint rules, can also be defined here.

Read the [polymer.json spec](https://www.polymer-project.org/2.0/docs/tools/polymer-json) for a full list of all supported fields with examples.
Read the [polymer.json spec](https://www.polymer-project.org/3.0/docs/tools/polymer-json) for a full list of all supported fields with examples.


## Command Overview
Expand All @@ -70,7 +70,7 @@ Run `polymer init` to choose a template from a list of all installed templates.

Installs your dependencies from Bower or npm.

If the `--variants` option is provided, the command will also search your project's `bower.json` for a `"variants"` property and install any dependency variants listed there. [Dependency variants](https://www.polymer-project.org/2.0/docs/glossary#dependency-variants) describe alternative sets of dependencies to install alongside your normal `bower_components/` folder. Other CLI commands like `polymer test` and `polymer serve` are able to read these alternative dependency sets and test/serve them in parallel. This is especially useful if you need to test your elements against multiple versions of Polymer and/or other dependencies.
If the `--variants` option is provided, the command will also search your project's `bower.json` for a `"variants"` property and install any dependency variants listed there. [Dependency variants](https://www.polymer-project.org/3.0/docs/glossary#dependency-variants) describe alternative sets of dependencies to install alongside your normal `bower_components/` folder. Other CLI commands like `polymer test` and `polymer serve` are able to read these alternative dependency sets and test/serve them in parallel. This is especially useful if you need to test your elements against multiple versions of Polymer and/or other dependencies.

By default, `polymer install` installs dependencies from Bower, similar to running `bower install`. If the `--npm` option is provided or `"npm": true` is specified in your `polymer.json`, then this command is equivalent to running `npm install`.

Expand Down Expand Up @@ -110,7 +110,7 @@ Run `polymer help test` for the full list of available options.

Build a Polymer application for production. This includes support for optimizations like code bundling, minification, and ES6 compilation to run on older browsers.

Most optimizations are disabled by default. To make sure the correct build enhancements are always used, you can provide a set of build configurations via the ["builds"](https://www.polymer-project.org/2.0/docs/tools/polymer-json#builds) field of your `polymer.json` file:
Most optimizations are disabled by default. To make sure the correct build enhancements are always used, you can provide a set of build configurations via the ["builds"](https://www.polymer-project.org/3.0/docs/tools/polymer-json#builds) field of your `polymer.json` file:

```json
"builds": [{
Expand All @@ -135,7 +135,7 @@ Run `polymer help analyze` for the full list of available options.

## Supported Node.js Versions

Polymer CLI supports the [current & active LTS versions](https://github.com/nodejs/LTS) of Node.js and later. See the [Polymer Tools Node.js Support Policy](https://www.polymer-project.org/2.0/docs/tools/node-support) for more information.
Polymer CLI supports the [current & active LTS versions](https://github.com/nodejs/LTS) of Node.js and later. See the [Polymer Tools Node.js Support Policy](https://www.polymer-project.org/3.0/docs/tools/node-support) for more information.

## Compiling from Source

Expand Down