Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Grunt your World

Akshay Patel
November 07, 2013

Grunt your World

How Yahoo Media is using Grunt.js to automate build tasks, scaffold new projects, and automate FE workflows like image minification, code beautification and deploying assets.

Akshay Patel

November 07, 2013
Tweet

Transcript

  1. • Task based CLI tool • Runs on Node.js •

    Uses NPM to extend functionality • Massive eco-system • Functionality similar to most *akefiles Grunt
  2. How do I use it? $ npm install grunt-cli -g

    $ touch Gruntfile.js $ npm install grunt-contrib-jshint
  3. Asset Loader • Builds YUI module meta data rollup file

    for use by YUI Loader on the client. • Leverages express-yui (modown). • Example: http://bit. ly/1elVgxN
  4. • Custom scaffolding to build project folder and file structure.

    • Provides prompts to customize your project. • Works great but “almost” deprecated in favor of Yeoman generators.
  5. • Grunt tasks that ensure your applications code quality guidelines

    are met. • Sniffers we use: ◦ console.log checks ◦ Template helper enforcement ◦ i18n resource bundle verifications
  6. • Rollup task to run a series of tasks. •

    Used at build time. • Runs cssproc, imagemin, asset loader and asset deployment.