-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgruntfile.js
36 lines (34 loc) · 970 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
general: {
options: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> By <%= pkg.author %>, <%= grunt.template.today("dd-mm-yyyy") %>, <%= pkg.repository.url %>, License: <%= pkg.license %> */\n',
mangle: {
except: ['gatrack']
}
},
files: {
'dist/gatrack.min.js': ['src/gatrack.js']
}
}
},
jshint: {
files: ['gruntfile.js', 'src/gatrack.js'],
options: {
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('test', ['jshint']);
grunt.registerTask('crush', ['uglify']);
grunt.registerTask('default', ['jshint', 'uglify']);
};