Skip to content

Commit 83ab5a1

Browse files
web-padawanTimvdLippe
authored andcommitted
Update development instructions for 3.0 (#5226)
* Remove outdated migration image * Update development instructions, fix broken link * [ci skip] Update polymer-cli instructions and link
1 parent 25a0e88 commit 83ab5a1

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,22 +65,21 @@ If you've completed all of these steps the core team will do its best to respond
6565

6666
Though the aim of the Polymer library is to allow lots of flexibility and not get in your way, we work to standardize our elements to make them as toolable and easy to maintain as possible.
6767

68-
All elements should follow the [Polymer element style guide](http://polymerelements.github.io/style-guide/), which defines how to specify properties, documentation, and more. It's a great guide to follow when building your own elements as well, for maximum standardization and toolability. For instance, structuring elements following the style guide will ensure that they work with the [`iron-component-page`](https://github.com/polymerelements/iron-component-page) element, an incredibly easy way to turn any raw element directly into a documentation page.
68+
All elements should follow the [Polymer element style guide](https://www.polymer-project.org/3.0/docs/tools/documentation), which defines how to specify properties, documentation, and more. It's a great guide to follow when building your own elements as well, for maximum standardization and toolability. For instance, structuring elements following the style guide will ensure that they work with the [`iron-component-page`](https://github.com/polymerelements/iron-component-page) element, an incredibly easy way to turn any raw element directly into a documentation page.
6969

7070
#### Contributing Code to the Polymer library
7171

72-
We follow the most common javascript and HTML style guidelines for how we structure our code - in general, look at the code and you'll know how to contribute! If you'd like a bit more structure, the [Google JavaScript Styleguide](https://google.github.io/styleguide/javascriptguide.xml) is a good place to start.
72+
We follow the most common JavaScript and HTML style guidelines for how we structure our code - in general, look at the code and you'll know how to contribute! If you'd like a bit more structure, the [Google JavaScript Styleguide](https://google.github.io/styleguide/javascriptguide.xml) is a good place to start.
7373

7474
Polymer also participates in Google's [Patch Rewards Program](https://www.google.com/about/appsecurity/patch-rewards/), where you can earn cold, hard cash for qualifying security patches to the Polymer library. Visit the [patch rewards page](https://www.google.com/about/appsecurity/patch-rewards/) to find out more.
7575

7676
## Unit tests
7777

78-
All Polymer projects use [`web-component-tester`](https://github.com/Polymer/web-component-tester) for unit tests.
79-
The [`polyserve`](https://github.com/PolymerLabs/polyserve) utility is helpful for running tests in the browser.
78+
All Polymer projects use [`polymer-cli`](https://github.com/Polymer/tools/tree/master/packages/cli) for unit tests.
8079

81-
For maximum flexibility, install `web-component-tester` and `polyserve` locally:
80+
For maximum flexibility, install `polymer-cli` locally:
8281

83-
npm install -g polyserve web-component-tester
82+
npm install -g polymer-cli
8483

8584
### Running the Polymer library unit tests
8685

@@ -90,39 +89,39 @@ To run the Polymer library unit tests:
9089

9190
2. Install the dependencies:
9291

93-
npm install && bower install
92+
npm install
9493

9594
3. Run the tests:
9695

9796
npm test
9897

99-
Or if you have `web-component-tester` installed locally:
98+
Or if you have `polymer-cli` installed locally:
10099

101-
wct
100+
polymer test --npm
102101

103102
To run individual test suites:
104103

105104
<code>npm test <var>path/to/suite</var></code>
106105

107106
Or:
108107

109-
<code>wct <var>path/to/suite</var></code>
108+
<code>polymer test --npm <var>path/to/suite</var></code>
110109

111110
For example:
112111

113-
npm test test/unit/template.html
112+
polymer test --npm test/unit/polymer.element.html
114113

115114
You can also run tests in the browser:
116115

117-
polyserve
116+
polymer serve --npm
118117

119118
Navigate to:
120119

121-
[`http://localhost:8080/components/polymer/test/runner.html`](http://localhost:8080/components/polymer/test/runner.html)
120+
[`http://localhost:8080/components/@polymer/polymer/test/runner.html`](http://localhost:8080/components/@polymer/polymer/test/runner.html)
122121

123122
### Running Polymer element unit tests
124123

125-
To run the element unit tests, you need a global install of `web-component-tester` or `polyserve` (or both).
124+
To run the element unit tests, you need a global install of `polymer-cli` .
126125

127126
1. Clone the element repo.
128127

@@ -132,23 +131,23 @@ To run the element unit tests, you need a global install of `web-component-teste
132131

133132
1. Run the tests:
134133

135-
wct
134+
polymer test
136135

137136
Or run the tests in a browser:
138137

139-
polyserve
138+
polymer serve
140139

141140
Navigate to:
142141

143142
<code>http://localhost:8080/components/<var>element-name</var>/test/runner.html</code>
144143

145144
### Configuring `web-component-tester`
146145

147-
By default, `web-component-tester` runs tests on all installed browsers. You can configure it
146+
By default, `polymer test` runs tests on all installed browsers. You can configure it
148147
to run tests on a subset of available browsers, or to run tests remotely using Sauce Labs.
149148

150-
See the [`web-component-tester` README](https://github.com/Polymer/web-component-tester) for
151-
information on configuring the tool.
149+
See the [`web-component-tester` README](https://github.com/Polymer/tools/tree/master/packages/web-component-tester) for
150+
information on configuring the tool using by `polymer-cli` to run the tests.
152151

153152
### Viewing the source documentation locally
154153

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Web Components are now implemented natively on Safari and Chrome (~70% of instal
3232
* You can also save [this HTML file](https://gist.githubusercontent.com/kevinpschaaf/8a5acbea7b25d2bb5e82eeea2b105669/raw/c3a86872f07603e2d0ddae736687e52a5c8c499f/index.html) to a local file and run it in any browser that supports [JavaScript Modules]((https://caniuse.com/#search=modules)).
3333

3434
* When you're ready to use Polymer in a project, install it via [npm](https://www.npmjs.com/). To run the project in the browser,
35-
a module-compatible toolchain is required. We recommend installing the [Polymer CLI](https://github.com/Polymer/polymer-cli) to and using its development server as follows.
35+
a module-compatible toolchain is required. We recommend installing the [Polymer CLI](https://github.com/Polymer/tools/tree/master/packages/cli) to and using its development server as follows.
3636

3737
1. Add Polymer to your project:
3838

@@ -42,11 +42,11 @@ Web Components are now implemented natively on Safari and Chrome (~70% of instal
4242

4343
1. Install the Polymer CLI:
4444

45-
```npm i -g polymer-cli@next```
45+
```npm i -g polymer-cli```
4646

4747
1. Run the development server and open a browser pointing to its URL:
4848

49-
```polymer serve```
49+
```polymer serve --npm```
5050

5151
> Polymer 3.0 is published on [npm](https://www.npmjs.com/package/@polymer/polymer) using JavaScript Modules.
5252
This means it can take advantage of the standard native JavaScript module loader available in all current major browsers.

img/migration.png

-532 KB
Binary file not shown.

0 commit comments

Comments
 (0)