Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

How to Script: Yeoman Polymer Generator

# Install yo, grunt-cli, bower
npm install -g yo grunt-cli bower
# Check a version
yo --version && bower --version && grunt --version
# Install polymer generator
npm install -g generator-polymer
# Call subgenerator
yo polymer:gh
# Input your github username and element's name
# Go to landing page
open https://ragingwind.github.io/ragingwind-seed-element
# Create a new repository for brand new Polymer element
open http://github.com/new
# 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. https://github.com/ragingwind-seed-element.git
git remote add origin https://github.com/<your-account>/<your-brand-new-element-name>.git
# Push the source to github
git push -u origin master
# Check the repository
# Make a project direcotry
mkdir my-proj; cd my-proj
# Make a component direcotry
mkdir -p components/ragingwind-seed-element && cd $_
# Do scaffoling for seed-element
yo polymer:seed
# Input user name of Github
ragingwind enter
# Check a tree
cd ..; tree -L 1
# Preview landing page and demo
http-server & ; open http://localhost:8080/ragingwind-seed-element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment