-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
38 lines (32 loc) · 1023 Bytes
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
cssmin: {
target: {
files: [{
src: ['site/_site/css/main.css'],
dest: 'site/css/main.min.css'
}]
}
},
'git-describe': {
options: {
template: '{%=object%}'
},
your_target: {
files: 'site/_includes/data/commit',
},
},
});
grunt.loadNpmTasks('grunt-git-describe');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('saveRevision', function () {
grunt.event.once('git-describe', function (rev) {
grunt.file.write('site/_includes/data/commit', rev);
});
grunt.task.run('git-describe');
});
// the default task can be run just by typing 'grunt' on the command line
grunt.registerTask('default', ['cssmin']);
};