Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Cloning Polymer/tools to workspace
git clone git://
# Make a tmp directory
mkdir tmp; cd tmp
# Execute script
# ueses: tools/bin/ <your-account> <repository-name>
../tools/bin/ ragingwind ragingwind-seed-element
# Opening landing page (gh_pages)
# eg. open http://<your-account><repository-name>

How to Script: Polymer Offical Boilerplate

# Create a new repository for brand new Polymer element
# Input your element name to repository and submit
# eg. ragingwind-seed-element
# Do git
git init; git add .; git commit -m 'My first version'
# eg.
git remote add origin<your-account>/<your-brand-new-element-name>.git
# Push the source to github
git push -u origin master
# Check the repository
# Create a workspace for project
mkdir my-app; cd my-app
# Download and unpack official boilerplage package
# from github, PolymerLab
tar xvf v0.1.0.tar.gz
# Rename the element to own element-name (eg ragingwind-seed-element)
# Rename the element's path
mv seed-element-0.1.0 ragingwind-seed-element; cd ragingwind-seed-element
# Rename the element string in source files
sed -i -e 's/seed-element/ragingwind-seed-element/g' ./bower.json ./demo.html ./index.html ./seed-element.css ./seed-element.html ./tests/index.html ./tests/seed-element-basic.html ./tests/tests.html
rm *-e
# Rename the element source code file name
mv ./seed-element.css ./ragingwind-seed-element.css
mv ./seed-element.html ./ragingwind-seed-element.html
# Install Bower packages and check that
bower install; ls -al ..
# Run webserver in parent path to preview seed-element
cd ..; http-server
# or
python -m SimpleHTTPServe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment