- Modular and clean Grunt configuration (via load-grunt-configs).
- No more
grunt.loadNpmTasks()
, all grunt tasks are automatically loaded (via jit-grunt). - Lazy-load Grunt tasks as needed, you no longer need to load a myriad of grunt tasks just so you can run the
grunt-contrib-concat
) (via jit-grunt). - Preconfigured watch task for your
gruntfile.js
and grunt tasks configurations so it will reload grunt if you modify them (via tasks/config/watch.js). - Load custom tasks from
./tasks
(via grunt.task.loadTasks). - Your suggestions and feature requests goes here
- First you have to download the files in your current working directory:
wget https://github.com/varemenos/grunt-boilerplate/archive/master.zip
unzip master
mv grunt-boilerplate-master/* .
rm -r grunt-boilerplate-master master tasks/sample LICENSE README.md
- Then you have to install grunt and the boilerplate's required grunt tasks:
npm i -D grunt grunt-contrib-watch jit-grunt load-grunt-configs
The boilerplate consists of a Gruntfile.js
file and a tasks
directory.
.
├── Gruntfile.js
└── tasks
This is the grunt configuration file which contains all the necessary commands to load any grunt-tasks you've installed via npm and are currently in your node_modules directory
In the tasks
directory there are 2 things you can do.
- Add your customs tasks.
- Add your task configurations inside the
config
subdirectory (like for example thewatch.js
file which is the configuration file for thegrunt-contrib-watch
task).
.
├── Gruntfile.js
└── tasks
└── custom_task_1.js
└── another-one.js
└── config
└── watch.js
└── sass.js
└── uglify.js
module.exports = {
my_task: {
options: {
async: true
},
dist: {
src: ['input.js'],
dest: 'output.js'
}
}
};
You can find more examples here.
The MIT License