Download E-books Getting Started with Grunt: The JavaScript Task Runner PDF

By Jaime Pillora

A handson method of learning the basics of Grunt

About This Book

  • Gain perception at the center ideas of Grunt, Node.js and npm to start with Grunt.
  • Learn the best way to set up, configure, run, and customise Grunt
  • Example-driven and choked with how one can assist you create customized Grunt tasks

Who This e-book Is For

This e-book is for JavaScript builders who are looking to familiarize yourself with GruntJS and use it to construct and attempt their JavaScript functions. the one requirement for this ebook is a easy figuring out of gadgets and services in JavaScript.

What you'll Learn

  • Learn approximately Grunt and its advantages
  • Understand Node.js and the way it pertains to Grunt
  • Take an in-depth examine npm, Node.js modules, and the operating of Grunt plugins
  • Get conversant in fitting Grunt and constructing your first Grunt construct environment
  • Gain perception at the tools of configuring Grunt and while each one procedure might be used
  • Effectively execute Grunt by utilizing activity arguments, job aliasing, multi-task pursuits, and more
  • Construct your personal Grunt projects, multi-tasks, and asynchronous tasks

In Detail

In fresh occasions, smooth internet browsers became the applying platform of selection. Grunt, in addition to its wide selection of plugins, presents an easy method of coping with the massive variety of construct initiatives required to keep up a worldly net application.

Getting began with Grunt: The JavaScript job Runner provide you with all of the info you must turn into a good Grunt power-user. you are going to speedy the best way to set up, configure, and run Grunt. you'll move directly to know the way to exploit third-party Grunt after which create your personal Grunt projects that cater in your specific needs.

This e-book first demonstrates quite a few Grunt use instances prior to operating in the course of the steps of putting in, configuring, working, and customizing Grunt. you'll how you can set up Node.js, the Node.js package deal supervisor (npm), and Grunt. Then, you are going to know how to establish and configure a personalised Grunt setting. subsequent, you are going to examine a few of the equipment of working and customizing Grunt to make use of its flexibility. ultimately, to emphasize what has been learnt, you can find a whole instance construct of an internet application.

Getting begun with Grunt: The JavaScript job Runner will allow you to create your own Grunt environments from scratch and completely make the most of Grunt's huge function set to successfully clear up your customized requirements.

Show description

Read Online or Download Getting Started with Grunt: The JavaScript Task Runner PDF

Similar Javascript books

The JavaScript Pocket Guide (Peachpit Pocket Guide)

JavaScript is an object-oriented scripting language that permits you to switch a document's constitution, styling, and content material in keeping with consumer activities. this useful pocket serves as either a short advent to the language and acts a helpful reference. it really is choked with suggestions in addition to JavaScript syntax, equipment, and homes.

Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript (Effective Software Development Series)

“It’s unusual to have a programming language wonk who can communicate in such cozy and pleasant language as David does. His stroll during the syntax and semantics of JavaScript is either captivating and highly insightful; reminders of gotchas supplement practical use circumstances, paced at a comfy curve. You’ll locate in case you end the e-book that you’ve received a robust and entire feel of mastery.

JavaScript and AJAX For Dummies

Learn how to use those strong instruments jointly and construct sites that paintings so one can construct web content that supply actual price on your site's viewers, JavaScript and AJAX are best instruments for the task. no matter if you are new to internet programming, this e-book is helping you create websites any fashion designer will recognize. With easy-to-understand steps and an emphasis on loose instruments, one can bounce correct into development a website utilizing an analogous concepts because the execs.

Greasemonkey Hacks: Tips & Tools for Remixing the Web with Firefox

Greasemonkey Hacks is a useful compendium a hundred inventive hacks for energy clients who are looking to grasp Greasemonkey, the new new Firefox extension in order to write scripts that adjust the internet pages you stopover at. With Greasemonkey, you could create scripts that make a website extra usable, repair rendering insects that webmasters cannot be troubled to mend themselves, or upload goods to an internet site's menu bar.

Extra resources for Getting Started with Grunt: The JavaScript Task Runner

Show sample text content

Right here, we will see that Grunt has indexed every one of our initiatives, in addition to its description, and multitasks are suffixed with a celebrity *. this is often valuable since it will not be noticeable to these new to this construct that the all job runs either the examine job and the collect activity. Programmatically even though it is feasible to execute Grunt from one other software, it really is meant for use as a command-line application, and consequently its API is just for use with the grunt executable. we will be able to, despite the fact that, programmatically run initiatives inside different projects, permitting us to conditionally run a chain of projects. the subsequent instance is especially just like Code instance 04-linting from bankruptcy 1, Introducing Grunt. This time, notwithstanding, rather than defining our JSHint ideas inside of our Gruntfile. js, we're defining them in a conveyable . jshintrc dossier. this can be favorable to a couple because it offers the power to take advantage of a company-wide JavaScript coding kind: //Code instance 12-conditional-lint module. exports = function(grunt) { // Load the plugin that offers the "jshint" activity. grunt. loadNpmTasks('grunt-contrib-jshint'); // undertaking configuration. grunt. initConfig({ jshint: { concepts: { jshintrc:'. jshintrc' }, target1: 'src/**/*. js' } }); }; With this configuration, in spite of the fact that, the jshint activity will fail if the . jshintrc dossier is lacking: $ grunt jshint working "jshint:target1" (jshint) job mistakes: cannot locate config dossier: . jshintrc as a result, if we would have liked to make our jshint job run basically after we supply a . jshintrc dossier, then lets make one other job that controls the execution of the jshint job: // a brand new job to make "jshint" non-compulsory grunt. registerTask('check', function() { if(grunt. dossier. exists('. jshintrc')) { grunt. activity. run('jshint'); } }); In our new money activity, we will first make sure that the . jshintrc exists, after which we are going to programmatically run the jshint job utilizing the grunt. job. run functionality. Now, after we run the payment activity and not using a . jshintrc dossier, Grunt may still do not anything and document good fortune: $ grunt fee working "check" job performed, with out mistakes. although, after we comprise our . jshintrc dossier at the side of our Gruntfile. js and rerun our payment activity, we must always see the next: $ grunt payment working "check" job working "jshint:target1" (jshint) job >> 1 dossier lint unfastened. performed, with no error. For an instance of a . jshintrc dossier, please consult with http://gswg. io#jshintrc-example. For a precis of JavaScript Linting, please go back to the Static research or Linting part of bankruptcy 1, Introducing Grunt. immediately probably the most well known Grunt plugins is grunt-contrib-watch (http://gswg. io#grunt-contrib-watch) because it permits us to put Grunt within the history and feature it immediately run our initiatives as they are wanted. Written through Kyle Robinson younger, the watch activity instructs Grunt to monitor a selected set of documents for alterations and execute a specific job or set of projects in reaction. within the following instance, we are going to watch our resource documents, after which run our JavaScript concatenation activity concat each time any of those records are replaced: //Code instance 13-watch module.

Rated 4.31 of 5 – based on 3 votes