On Github ragingwind / yeoman-with-chrome-extentions-generator
open_site().find().download().move()([ 'boilerplates', 'libraries' ]); config([ 'pacakge.json', '.editorconfig', '.jshintrc', 'Gruntfile' ]);
_.loop( function(){ out_of_date && open_site().find().download().move([ 'libraries' ]); (sass && compass) && watch(); coffee ? coffee().compile() : coding().linting(); livereload || find_and_switch_browser().reload_by_my_hand(); debugging().tuning(); }, time_to_go_home() );
linting().compile().min().uglify().optimize().package().dist();
# defualt generator yo webapp # angular generator yo angular yo angular:controller myController yo angular:directive myDirective yo angular:filter myFilter # chromes apps generator yo chromeapp yo chrome-extentions
#search bower search backbone # install one or more dependencies bower install backbone.layoutmanager # list installed dependencies. bower list # update to the latest version available bower update lodash
# build an optimized, production-ready version grunt # preview your app (Livereload) grunt server # run the unit tests for an app grunt test
# scaffolds yo webapp # install default dependencies npm install && bower install # install a dependency for your project from Bower bower install jquery # test and preview your app grunt test grunt server # build the application for deployment grunt
var manifest = { name: 'my prototype extension', assets: [ 'icon16,19,38,128', 'popup.html', 'option.html', 'main.css' ], scripts: [ 'background', 'contentscript' ], lib: [ 'boilerplates', 'libraries' ] }; write(manifest); prev ? copy(manifest) : make(manifest); });
compile().concat().optimize().COMPRESS().publish();
# install with official package npm install generator-chrome-extension # install with preview version, via github repo npm install 'git://github.com/ragingwind/generator-chrome-extension.git' # scaffolds, generate menifest.json, default script/html/assets yo chrome-extension # install default dependencies npm install && bower install # test, build and compress grunt jshint && grunt test grunt
yo chrome-extension # interacting with options Would you like to use UI Action(1: Browser, 2:Page)? 2 Would you like to use the Options Page? (y/N) y Would you like to use the Content Scripts? (y/N) y Would you like to declare the "Tabs" permission? (y/N) y # install default dependencies npm install && bower install bower insall jquery --save && bower insall oauth2-extensions-for-test --save # test, lint and build grunt jshint && grunt test grunt
yo chrome-extension # interacting with options Would you like to use UI Action(1: Browser, 2:Page)? 1 Would you like to declare the "Tabs" permission? (y/N) y Would you like to declare the "History" permission? (y/N) y # install default dependencies npm install && bower install bower insall jquery --save # test, lint and build grunt jshint && grunt test grunt
yo chrome-extension # interacting with options Would you like to use UI Action(1: Browser, 2:Page)? 0 Would you like to use the Omnibox? (Please input keyword) dic # install default dependencies npm install && bower install # test, lint and build grunt jshint && grunt test grunt