-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
63 lines (59 loc) · 1.94 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*global module:false */
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsbeautifier: {
files: ['**/*.js', '**/*.css', '**/*.html', '!**/*.min.*', '!bower_components/**/*', '!node_modules/**/*'],
options: {}
},
jshint: {
all: ['**/*.js', '!**/*.min.js', '!bower_components/**/*', '!node_modules/**/*'],
options: {
jshintrc: true
}
},
githooks: {
all: {
options: {},
'pre-commit': 'jshint jsbeautifier',
'post-merge': {
taskNames: 'bower:install'
}
}
},
uglify: {
my_target: {
options: {
sourceMap: true
},
files: {
'flexible-scrollbar/flexible-scrollbar.min.js': ['flexible-scrollbar/flexible-scrollbar.js']
}
}
},
cssmin: {
target: {
options: {
sourceMap: true
},
files: {
'flexible-scrollbar/flexible-scrollbar.min.css': ['flexible-scrollbar/flexible-scrollbar.css']
}
}
},
touch: {
// cssmin issue have to create files manually
src: ['flexible-scrollbar/flexible-scrollbar.min.css']
}
});
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-touch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ['jshint', 'jsbeautifier', 'uglify', 'touch', 'cssmin']);
grunt.registerTask('pre-commit', ['jshint']);
};