Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit f19e4df

Browse files
author
Anne-Sophie Coquer
committed
[DOC] Bug fixes #17455
1 parent 57fd581 commit f19e4df

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

CONTRIBUTING.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
# Contributing to MyScript Web Components
22

3-
We welcome pull requests to MyScript Web Components. If you'd like to new or larger feature, keep reading.
3+
We gladly welcome pull requests to MyScript Web Components. If you would like to add or modify new or larger features, see the "Adding features" section.
44
If you have any questions, or want help solving a problem, feel free to stop by the [#MyScript forum](https://dev.myscript.com/support/forum/).
55

6-
#### Adding new features
6+
## Code format
77

8-
Components are distributed as sets of HTML and CSS files. If the feature you want to add is similar to an existing component, add your contribution to these files.
8+
* each filename should be in smallcaps
9+
* 4 spaces for indentation
10+
* 120 character-line length
911

10-
If you create a new component, you should create a new set of file (HTML and CSS) associated to this new component. File name should be the component name in smallcaps.
12+
In general, try to make your code blend in with the surrounding code.
13+
14+
## Adding features
15+
16+
Components are distributed as sets of HTML and CSS files. If the feature you want to add belongs to an existing component, add your contribution to the corresponding file.
17+
18+
If you create a component, you should create a new set of files (HTML and CSS) associated to this component. Filename should be the component name in smallcaps.
1119

1220
## Testing
1321

14-
Local testing can be using the `web-component-tester` engine through a web server. First, install all dependencies
15-
`bower install` from the root folder of the project, then open the test page from a web browser.
22+
Local testing can be done using the `web-component-tester` engine through a web server. First, install all dependencies `bower install` from the root folder of the project, then open the test page in a web browser.
1623

17-
#### Testing in other browsers
24+
MyScript Web Components supports all major browsers. Unfortunately, it is hard to test new changes so if you can, please test your changes in as many browsers as possible.
1825

19-
MyScript Web Components supports all major browsers. Unfortunately, it is hard to test new changes in many browsers. If you can, please test your changes in as many browsers as possible.
26+
Simply navigate to the `/test` directory of your element to run its tests. If
27+
you are using [Polyserve](https://github.com/PolymerLabs/polyserve): `http://localhost:8080/components/myscript-math/test/`
2028

21-
## Style guide
29+
### web-component-tester
2230

23-
Code
31+
Install [web-component-tester](https://github.com/Polymer/web-component-tester): `npm install -g web-component-tester` as tests are compatible with it. You can then run your tests on *all* of your local browsers: `wct`
2432

25-
- 4 spaces for indentation
26-
- 120 character line length
27-
- declare variables in the outermost scope that they are used
33+
#### WCT Tips
2834

29-
In general, try to make your code blend in with the surrounding code.
35+
`wct -l chrome` will only run tests in Google Chrome.
36+
37+
`wct -p` will keep the browsers alive after test runs (refresh to re-run).
38+
39+
`wct test/some-file.html` will test only the files you specify.
3040

3141
## CLA
3242

33-
In order to contribute, you must first agree to the **Contributor License Agreement**, found [here](http://goo.gl/forms/YyzZ9VSvYG).
43+
In order to contribute, you must first agree to the **Contributor License Agreement** available [here](http://goo.gl/forms/YyzZ9VSvYG).
3444

35-
Make sure you have read the article "[Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)" to understand the process of contributing.
45+
Make sure you read the article "[Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)" to understand the contributing process.
3646

3747

3848
## License
3949

40-
This library is licensed under the [Apache 2.0](http://opensource.org/licenses/Apache-2.0).
41-
50+
This library is licensed under the [Apache 2.0](http://opensource.org/licenses/Apache-2.0).

0 commit comments

Comments
 (0)