-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathGruntfile.js
More file actions
39 lines (33 loc) · 737 Bytes
/
Copy pathGruntfile.js
File metadata and controls
39 lines (33 loc) · 737 Bytes
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
/**
* pjax-standalone build script
*/
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
ignore_warning: {
src: ['pjax-standalone.js'],
options: {
'-W061': true, // eval is needed
},
}
},
uglify: {
options: {
preserveComments: 'some'
},
build: {
src: 'pjax-standalone.js',
dest: 'pjax-standalone.min.js'
}
},
watch: {
files: ['pjax-standalone.js'],
tasks: ['uglify']
}
});
grunt.registerTask('default', ['jshint','uglify']);
}