-
Book Overview & Buying
-
Table Of Contents
Learning Yeoman
By :
Now that we have an overview on using Grunt and the power that it can bring to a new or existing project, let's use the Yeoman Grunt plugin generator to create a custom Grunt plugin that will allow the use of custom created tasks in any project.
To install the Yeoman Grunt plugin generator, execute the following command:
$ npm install -g generator-gruntplugin
The preceding command will install the Grunt plugin generator globally on your system, allowing the use of the yo gruntplugin command from within any directory.
To use the Grunt plugin generator, execute the following command:
$ yo gruntplugin
The directory structure that is created contains very few files and modules by default, but your plugin can include any Grunt task installed into the project. Take a look at the directory structure created by Yeoman:
├── Gruntfile.js ├── README.md ├── node_modules │ ├── grunt │ ├── grunt-contrib-clean │ ...
Change the font size
Change margin width
Change background colour