-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGruntfile.js
More file actions
43 lines (36 loc) · 1.17 KB
/
Gruntfile.js
File metadata and controls
43 lines (36 loc) · 1.17 KB
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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['Gruntfile.js', 'src/javascript-dfp.js']
},
uglify: {
build: {
src: 'src/javascript-dfp.js',
dest: 'dist/javascript-dfp.min.js'
}
},
htmlmin: { // Task
dist: { // Target
options: { // Target options
removeComments: true,
collapseWhitespace: true
},
files: { // Dictionary of files
'dist/dfp-ad.html': 'src/dfp-ad.html' // 'destination': 'source'
}
}
}
});
// Load the plugin that provides the "jshint" task.
grunt.loadNpmTasks('grunt-contrib-jshint');
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
// Load the plugin that provides the "htmlmin" task.
grunt.loadNpmTasks('grunt-contrib-htmlmin');
// Load the plugin that provides the "jasmine" task.
//grunt.loadNpmTasks('grunt-contrib-jasmine');
// Default task(s).
grunt.registerTask('default', ['jshint', 'uglify','htmlmin']);
};