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:
Leave the project name as the default.
For the description, use “Open the page in Chrome.”
Leave the version number as the default value.
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.
Leave the project home page, the issue tracker, and the license at their default values.
Enter your name for the author name.
Enter your email for the author email.
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 |
18.226.172.130