-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
80 lines (67 loc) · 2.05 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = function(grunt) {
require("matchdep").filterAll("grunt-*").forEach(grunt.loadNpmTasks);
grunt.initConfig({
clean: ['dist'],
mkdir: {
default: {
options: {
create: ['dist']
}
}
},
copy: {
default: {
files: [
{expand: true, cwd: 'src/scripts', src: ['*.js'], dest: 'dist/', flatten: true}
]
}
},
sass: {
options: {
sourceMap: false
},
default: {
options: {
outputStyle: 'expanded'
},
files: {
'dist/simple-notifications.css': 'src/styles/main.scss'
}
},
minified: {
options: {
outputStyle: 'compressed'
},
files: {
'dist/simple-notifications.min.css': 'src/styles/main.scss'
}
}
},
uglify: {
default: {
options: {
banner: "/*\nsimple-notifications.js. https://github.com/simple-notifications.\nBuilt <%= grunt.template.today() %>.\n*/\n\n",
compress: true,
sourceMap: false,
mangle: true
},
files: {
'dist/simple-notifications.min.js': 'dist/simple-notifications.js'
}
}
},
// Test server, used to fire up the demo page easily.
connect: {
server: {
options: {
port: 6288,
keepalive: true,
open: 'http://localhost:6288/demo'
}
}
}
});
grunt.registerTask('build', ['clean', 'mkdir', 'sass', 'copy', 'uglify']);
grunt.registerTask('demo', ['build', 'connect']);
grunt.registerTask('default', ['build']);
};