Tomasz Ducin
independent consultant, architect, developer, trainer, speaker #architecture #performance #javascript #typescript #react #angular
...czyli kamerdyner na wezwanie
Tomasz Ducin
12th November 2014, Warsaw
senior software engineer @ Hewlett-Packard
blah, blah, blah...
or butler on call
Tomasz Ducin
16th October 2014, Warsaw
previously at warsjawa.pl 2014 under
modern webapp development workflow/tools
housewife manifesto
benefits of using yeoman
an example
install npm (along with entire node.js):
[sudo] apt-get install nodejs
install a package globally:
[sudo] npm install -g <package>
or locally:
npm install <package> npm install <package> --save npm install <package> --save-dev
initialize package (create package.json
manifest file):
npm init
fetch node modules for existing project:
cd my-node-package npm install
save package in registry:
npm publish
likely to install npm
along with other tools (bower, grunt)
on a CI server!
install bower tool:
[sudo] npm install -g bower
install bower packages:
bower install <package> bower install <package> --save bower install <package> --save-dev
initialize package (create bower.json
manifest file):
bower init
register bower package:
bower register <package-name> <git-endpoint>
list packages and check for updates:
bower list
install all packages from bower.json:
bower install
dependency conflicts resolved:
Unable to find a suitable version for ember, please choose one: 1) ember#~1.0.0 which resolved to 1.0.1 and is required by ember-data#0.0.14 2) ember#1.5.1 which resolved to 1.5.1 and is required by melodrama
"resolutions": { "ember": "1.5.1" }
install grunt tool:
[sudo] npm install -g grunt-cli npm install grunt --save-dev
edit Gruntfile.js (manifest file) manually or using grunt-init:
[sudo] npm install -g grunt-init # put content into ~/.grunt-init grunt-init gruntfile
static code analysis:
npm install grunt-contrib-jshint --save-dev
Example grunt tasks
minify files (for release):
npm install grunt-contrib-uglify --save-dev
background automatic tasks:
npm install grunt-contrib-watch --save-dev
install yeoman tool:
[sudo] npm install -g yo
install specific generator:
[sudo] npm install -g generator-backbone
run the generator:
mkdir my-yo-project cd my-yo-project yo backbone
build entire application:
grunt build
run application in source-mode:
grunt serve
run application in built-mode:
grunt serve:dist
By Tomasz Ducin
Presentation during Warsaw JavaScript meetings, meet.js October 2014
independent consultant, architect, developer, trainer, speaker #architecture #performance #javascript #typescript #react #angular