1 |
www |
1 |
module.exports = function(grunt) {
|
|
|
2 |
|
|
|
3 |
// load all tasks from package.json
|
|
|
4 |
require('load-grunt-config')(grunt);
|
|
|
5 |
require('time-grunt')(grunt);
|
|
|
6 |
|
|
|
7 |
/**
|
|
|
8 |
* TASKS
|
|
|
9 |
*/
|
|
|
10 |
// build everything ready for a commit
|
|
|
11 |
grunt.registerTask('build', ['css', 'js']);
|
|
|
12 |
// just CSS
|
|
|
13 |
grunt.registerTask('css', ['sass', 'cssmin']);
|
|
|
14 |
// just images
|
|
|
15 |
grunt.registerTask('img', ['responsive_images:retina', 'exec:evenizer', 'responsive_images:regular', 'sprite', 'imagemin']);
|
|
|
16 |
// just javascript (babel must go before we add the wrapper, to keep it's generated methods inside, so not globals)
|
|
|
17 |
grunt.registerTask('js', ['eslint', 'template:jsAddVersion', 'babel', 'concat', 'uglify', 'replace']);
|
|
|
18 |
|
|
|
19 |
// build examples
|
|
|
20 |
grunt.registerTask('examples', ['template']);
|
|
|
21 |
// Travis CI
|
|
|
22 |
grunt.registerTask('travis', ['jasmine']);
|
|
|
23 |
// bump version number in 3 files, rebuild js to update headers, then commit, tag and push
|
|
|
24 |
grunt.registerTask('version', ['bump-only', 'js', 'bump-commit', 'shell:publish']);
|
|
|
25 |
|
|
|
26 |
};
|