-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
39 lines (36 loc) · 1.12 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
module.exports = function(grunt) {
var banner = '/*! SAFDOM v<%= pkg.version %> | (c) Alex Offshore | aopdg.com */';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
preserveComments: false,
sourceMap: true,
sourceMapName: 'dist/safdom.min.map',
ASCIIOnly: true,
report: 'min',
screwIE8: true,
beautify: {
ascii_only: true
},
banner: banner,
compress: {
conditionals: true,
evaluate: true,
loops: true,
hoist_vars: false,
if_return: true,
join_vars: true,
warnings: true,
}
},
build: {
src: 'src/safdom.js',
dest: 'dist/safdom.min.js'
},
},
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('build', ['uglify']);
grunt.registerTask('default', ['build']);
};