Creating the Plug-in Skeleton

First, create a new folder called grunt-open-with-chrome. Navigate into that folder and create another folder called tasks. Then run the npm init command to create the package.json file for the plug-in in that new folder:

 
$ ​mkdir grunt-open-with-chrome
 
$ ​cd grunt-open-with-chrome
 
$ ​mkdir tasks
 
$ ​npm init

When you run the generator, you’ll have to answer the usual questions. For this exercise, answer them as follows:

  1. Leave the project name as the default.

  2. For the description, use “Open the page in Chrome.”

  3. Leave the version number as the default value.

  4. For the project Git repository, leave it as a default or enter a valid Git URL if you’d like to push your code to a Git repository.

  5. Leave the project home page, the issue tracker, and the license at their default values.

  6. Enter your name for the author name.

  7. Enter your email for the author email.

  8. Leave all of the other values at their defaults.

Next, run the following to install Grunt, because we’ll want to be able to test out our Grunt plug-ins:

 
$ ​npm install grunt --save-dev
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.172.130