We gladly welcome pull requests to MyScript Web. If you would like to add or modify new or larger features, see the Adding features section below. If you have any questions, or need help solving a problem, feel free to stop by the #MyScript forum.
- Filename in smallcaps,
- 4 spaces for indentation,
- 120 character-line length.
In general, try to make your code blend in with the surrounding code.
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.
If you want to create a component, first create a new set of files (HTML and CSS) associated to this component. Filename should be the component name in smallcaps.
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.
MyScript Web supports all major browsers. However, as it is hard to test all versions of all browsers, please test your changes in as many browsers as possible.
Simply navigate to the /test
directory of your element to run tests and launch your web server. If you are using Polyserve, open http://localhost:8080/components/myscript-renderer/test/
.
Install web-component-tester: npm install -g web-component-tester
. You can then run your tests on all your local browsers: wct
wct -l chrome
will only run tests in Google Chrome.
wct -p
will keep the browsers alive after test runs (refresh to re-run).
wct test/some-file.html
will test only the files you specify.
In order to contribute, you must first agree to the Contributor License Agreement available here.
Make sure you read the article Contributing to Open Source on GitHub to understand the contributing process.
This library is licensed under the Apache 2.0.