> sudo npm install -g yo
> mkdir my-project && cd my-project
> yo angular
> mkdir generator-fabulous && cd generator-fabulous && yo generator
https://github.com/sulmanen/generator-angular-module
There are practical little things in housekeeping that no man really understands
-Eleanor Roosevelt
> sudo npm install -g grunt-cli
> cd my_project && npm install grunt --save-dev
> npm install grunt-cli && grunt --save-dev
watch: {
options: {
atBegin: true,
livereload: true
},
app: {
files: ['app/**/*', 'Gruntfile.js'],
tasks: ['short']
}
}
useminPrepare: {
html: 'tmp/index.html'
},
usemin: {
html: ['tmp/*.html'],
css: ['tmp/app/css/vendor/**/*.css'],
options: {
dirs: ['tmp']
}
}
> npm install time-grunt --save-dev
module.exports = function(grunt) {
// dont need no time plugin on CI server
if (!CI_SERVER) {
require('time-grunt')(grunt);
}
require('load-grunt-tasks')(grunt, ['grunt-!(cli)']);
grunt.registerTask('short', [], function() {
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-angular-prangler');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.task.run('clean:all', 'stylus', 'lint-short', 'prangler', 'copy:stage', 'copy:main');
});
http://weblog.bocoup.com/tearing-grunt-apart/
> bower init
{ "name": "stats", "version": "0.0.1", "authors": [ "Samuli Ulmanen <samuli.ulmanen@rovio.com>" ], "private": true, "description": "Stats", "main": "stats.js", "keywords": [ "analytics", "scheduler", "angular" ], "license": "All rights reserved", "dependencies": { "lodash": "2.4.0", "angular": "1.2.5", "angular-resource": "1.2.5", "angular-route": "1.2.5", "jquery": "2.0.3", "momentjs": "2.1.0", "later":"", "bootstrap-javascript": "2.3.2", "prettycron-scheduler-fork":"", "node-cron-sulmanen-fork":"1.0.4" }, "devDependencies": { "angular-mocks": "1.2.5", "angular-scenario": "1.2.5" } }
> bower install
"scripts": {
"postinstall": "./node_modules/.bin/bower install"
} thnx @quinnirill
> bower list --paths
{
"angular-mocks": "bower_components/angular-mocks/angular-mocks.js",
"angular-resource": "bower_components/angular-resource/angular-resource.js",
"angular-route": "bower_components/angular-route/angular-route.js",
"angular-scenario": "bower_components/angular-scenario/angular-scenario.js",
"angular": "bower_components/angular/angular.js",
"bootstrap-javascript": "bower_components/bootstrap-javascript/bootstrap.js",
"lodash": "bower_components/lodash/dist/lodash.compat.js",
"momentjs": "bower_components/momentjs/moment.js",
"prettycron-scheduler-fork": "bower_components/prettycron-scheduler-fork/prettycron.js",
"node-cron-sulmanen-fork": "bower_components/node-cron-sulmanen-fork/lib/cron.js",
"jquery": "bower_components/jquery/jquery.js",
"later": "bower_components/later/later.js"
}
https://github.com/yatskevich/grunt-bower-task
src: { options: { targetDir: './app/js/vendor', // this will strip component name layout: 'byType',
install: false, verbose: false, cleanTargetDir: true, cleanBowerDir: false, bowerOptions: { production: true } } }
> npm install bower-registry
{
"directory": "bower_components",
"json": "bower.json",
"registry": {
"register": "http://hawk:8888",
"search": [
"https://bower.herokuapp.com",
"http://hawk:8888"
]
}
}