Adding a Library
Currently CUBA Polymer UI module uses Bower as a package manager. Therefore, you can import any library that is published on GitHub.
Imagine that you want to use paper-toggle-button in your project. Its source code is located at https://github.com/PolymerElements/paper-toggle-button.
There are two ways to add this library to your project:
-
Via command line:
$ bower install PolymerElements/paper-toggle-button --save
-
Manually add it to
bower.json
:... "dependencies": { ... "paper-toggle-button": "PolymerElements/paper-toggle-button" }, ...
The library will be downloaded to bower_components/paper-toggle-button
folder and can be used in your code.
By default, Bower uses a default branch of the required dependency. If you want to use another version, specify it after the #
sign:
$ bower install PolymerElements/paper-toggle-button#3.0.0-pre.1 --save