forked from micc83/cookie-notice-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
52 lines (47 loc) · 1.38 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
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
port: 8000,
base: '.'
}
}
},
qunit: {
all: {
options: {
urls: [
'http://localhost:8000/tests/index.html'
]
}
}
},
strip_code: {
src: {
src: 'src/cookie.notice.js',
dest: 'dist/cookie.notice.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> by <%= pkg.author %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
report: 'gzip',
screwIE8: true
},
build: {
src: 'dist/cookie.notice.js',
dest: 'dist/cookie.notice.min.js'
}
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-strip-code');
// Default task(s).
grunt.registerTask('default', ['connect', 'qunit', 'strip_code', 'uglify']);
};