forked from acolangelo/jPanelMenu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
60 lines (52 loc) · 1.83 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {// https://www.npmjs.org/package/grunt-contrib-jshint
options: {
curly: true,
eqeqeq: true,
eqnull: true,
browser: true,
globals: {
jQuery: true,
Modernizr: true,
console: true
}
},
files: ['jquery.<%= pkg.name %>.js', 'jquery.<%= pkg.name %>-transform.js']
},
uglify: {
options: {
banner: '/** <%= pkg.name %> - <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> - <%= pkg.license %>*/\n'
},
build: {
src: 'jquery.<%= pkg.name %>.js',
dest: 'jquery.<%= pkg.name %>.min.js'
},
cssBuild: {
src: 'jquery.<%= pkg.name %>-transform.js',
dest: 'jquery.<%= pkg.name %>-transform.min.js'
}
},
watch: {
options: {
spawn: false,
reporter: require('jshint-stylish')
},
target: {
files: ['jquery.<%= pkg.name %>.js', 'jquery.<%= pkg.name %>-transform.js'],
tasks: ['javascript']
}
}
});
// Javascript code quality assurance
grunt.loadNpmTasks('grunt-contrib-jshint');
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
// Javascript code quality assurance
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['jshint', 'uglify']);
grunt.registerTask('javascript', ['jshint', 'uglify']);
};