-
Notifications
You must be signed in to change notification settings - Fork 253
/
Gruntfile.js
69 lines (67 loc) · 1.64 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
module.exports = function(grunt) {
grunt.initConfig({
licenseString:
'/* jQuery Bracket | Copyright (c) Teijo Laine 2011-<%= grunt.template.today("yyyy") %> | Licenced under the MIT licence */',
pkg: grunt.file.readJSON("package.json"),
watch: {
scripts: {
files: ["src/jquery.bracket.scss", "src/jquery.bracket.ts"],
tasks: ["default"]
}
},
sass: {
dist: {
files: {
"dist/jquery.bracket.css": "src/jquery.bracket.scss"
}
}
},
cssmin: {
options: {
banner: "<%= licenseString %>"
},
dist: {
files: {
"dist/jquery.bracket.min.css": "dist/jquery.bracket.css"
}
}
},
uglify: {
options: {
compress: true,
banner: "<%= licenseString %>\n"
},
dist: {
files: {
"dist/jquery.bracket.min.js": ["dist/jquery.bracket.js"]
}
}
},
tslint: {
options: {
configuration: grunt.file.readJSON("tslint.json")
},
files: {
src: ["src/*.ts"]
}
},
ts: {
default: {
src: ["src/*.ts", "!node_modules/**"],
dest: "dist/jquery.bracket.js"
},
options: {
sourceMap: true,
target: "es5",
additionalFlags: "--strictNullChecks"
}
}
});
grunt.loadNpmTasks("grunt-sass");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks("grunt-tslint");
grunt.loadNpmTasks("grunt-css");
grunt.registerTask("default", ["tslint", "sass", "ts", "uglify", "cssmin"]);
};