A Polymer web component for creating user control interfaces.
To run the example code, navigate to the parent directory and start a simple python server,
$ cd ..
$ python -m SimpleHTTPServer 9090
Once the server is running, open the following URL in your browser
http://127.0.0.1:9090/polymer-controls/examples
To install development dependencies,
$ make install
which installs node modules and bower components.
WARNING: bower components are installed in the parent directory, not the component directory.
By installing components in the parent directory, we mimic a production environment, in which bower components are siblings (needed for correct relative paths). Beware, however, that this may result in conflicts with existing components. Or worse, where existing sibling components are being developed (git repositories), completely overwriting siblings.
To avoid such issues, you may want to clone the repository into its own isolated directory. The downside of this approach is increased disk usage due to (possibly) duplicated dependencies.
The src
directory contains the component source files. Source files must be browserified and then vulcanized before creating a distributable component. To run the build,
$ make build
which generates a build
directory containing browserified scripts and a vulcanized distributable in the top-level directory.
Unit tests are run via web component tester, which in turn uses the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:
$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul to instrument code coverage. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-cov
Istanbul creates a ./reports/coverage
directory. To access an HTML version of the report,
$ make view-cov
Copyright © 2015-2016. The Compute.io Authors.