Skip to content

Instantly share code, notes, and snippets.

@ragingwind
Last active December 9, 2015 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ragingwind/a52209267fb2874783c8 to your computer and use it in GitHub Desktop.
Save ragingwind/a52209267fb2874783c8 to your computer and use it in GitHub Desktop.

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