grunt delicious

15
#Howto cook good JavaScript code w/ Grunt.JS Andrii Lundiak LANDIKE @ gmail.com Twitter: @landike 2014

Upload: andrii-lundiak

Post on 02-Jul-2015

902 views

Category:

Software


1 download

DESCRIPTION

Presentation about how to work with #GruntJS - Collection of "grunt contrib packages/modules usage examples" to work with on any project or get started during study.

TRANSCRIPT

Page 1: Grunt Delicious

#Howto cook good JavaScript code w/

Grunt.JSAndrii Lundiak LANDIKE @ gmail.comTwitter: @landike

2014

Page 2: Grunt Delicious

What?

Grunt.JSJavaScript task runner

- laziness => opportunity;- “build” automation;- save your time;- make project maintainable;- Node.JS family Author: @cowboy aka Ben Alman

Page 3: Grunt Delicious

Agenda❖ Short review of grunt contrib modules.

❖ Live usage examples.

❖ What next?

❖ Resources

❖ Q/A

Page 4: Grunt Delicious

Dependency mng.

❖ matchdep, load-grunt-tasks.

Page 5: Grunt Delicious

Min-Ugly-Beauty❖ grunt-contrib-concat, grunt-contrib-uglify,

❖ grunt-contrib-cssmin,

❖ grunt-contrib-htmlmin, grunt-contrib-imagemin,

❖ grunt-ngmin

Page 6: Grunt Delicious

Preprocessors❖ grunt-contrib-less,

❖ Ruby: grunt-contrib-sass or grunt-contrib-compass

❖ C: node-sass + node-sass-middleware (for connect) or grunt-sass (including node-sass) by @SindreSourus❖ @SindreSorus: “Check out grunt-contrib-sass if you prefer something more stable, but slower.”

Page 7: Grunt Delicious

Static Analysis (code validation)❖ grunt-jslint, grunt-contrib-jshint,

❖ grunt-contrib-jsonlint,

❖ grunt-contrib-csslint, grunt-lesslint

❖ grunt-eslint (not eslint-grunt ),

❖ grunt-mdlint,

❖ grunt-plato.

Page 8: Grunt Delicious

Shell/Files oriented❖ grunt-contrib-copy, grunt-sync, grunt-contrib-watch,

❖ grunt-clean, grunt-remove-logging, grunt-search,

❖ grunt-exec, grunt-shell, grunt-env, grunt-path,

❖ grunt-ssh,

❖ grunt-prompt,

❖ grunt-bower-task,

❖ grunt-concurrent,

❖ rimraf.

Page 9: Grunt Delicious

Release oriented❖ grunt-bump,

❖ grunt-readme => grunt-verb

❖ grunt-changelog, grunt-conventianal-changelog,

❖ grunt-inject, grunt-sails-linker,

❖ grunt-rev.

Page 10: Grunt Delicious

Server(s)❖ grunt-contrib-connect, or express ,

❖ connect-livereload,

❖ nodemon + grunt-nodemon, forever (outdated),

❖ grunt-concurrent.

Page 12: Grunt Delicious

js.next()? => gulp.js❖ Grunt vs Gulp +: Gulp uses node streams to group tasks together and process them sequentially in memory) +/-: Grunt’s tasks are configured in a configuration object inside the gruntfile while Gulp’s are coded using a Node style syntax -/+: 779 vs. 3,638.- : gulp error messaging.

Page 13: Grunt Delicious

Resources❖ Grunt.JS: Getting started

❖ Automating your JS with Grunt

❖ Grunt.JS add-on for Chrome

❖ Read: Build wars [grunt vs. gulp]

❖ Grunt-Delicious Project code =>

❖ https://bitbucket.org/alundiak/grunt-delicious/

Page 14: Grunt Delicious

– Mungara Tarou Krishnamurti

“Because answers exists only to questions.”

Page 15: Grunt Delicious

@landike says: