Search code examples
pythonpolymersetup-project

Setup script for Polymer Elements


I created a python web server using Polymer elements for the front-end. I was asked to commit my project to svn but leave out all the polymer elements. Instead, I am expected to write a setup script to load all the polymer elements. I installed all the polymer elements with bower but I am confused on how to write this "setup" script. Can anyone point me to the right direction? Thanks!


Solution

  • First, exclude your components with svn propset svn:ignore bower_components . (in git, this is usually a .gitignore file with a bower_components line).

    Then, ensure your bower.json file has the proper dependencies for all of those components. Then you can commit your code as normal.

    Finally, on the production server, after pulling the latest code your setup script should then call bower install in the directory containing the bower.json file.