-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgruntfile.js
More file actions
59 lines (55 loc) · 1.69 KB
/
gruntfile.js
File metadata and controls
59 lines (55 loc) · 1.69 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/// <binding ProjectOpened='watch:js, ts:default, ts:demo' />
/*
This file in the main entry point for defining grunt tasks and using grunt plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x409
*/
module.exports = function (grunt) {
grunt.initConfig({
ts: {
default: {
src: ["src/*.ts", "Scripts/typings/**/*.ts"],
outDir: "dist/components",
watch: "src/*.ts",
options: {
fast:"never",
declaration:true
}
},
demo: {
src: ["demo/demo.ts", "Scripts/typings/**/*.ts"],
outDir: "demo/",
watch: "demo/demo.ts",
options: {
fast: "never",
declaration: false
}
}
},
watch: {
js: {
files: ["dist/components/*.js", "dist/components/*.d.ts"],
tasks:["concat:js","concat:ts"]
}
},
concat: {
options: {
sourceMap: true
},
js: {
src: ["dist/components/au-core.js", "dist/components/*.js"],
dest:"dist/au.js"
},
ts: {
src: ["dist/components/*.ts"],
dest: "dist/au.d.ts",
options: {
sourceMap: false
}
}
}
});
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask("default", ["ts"]);
};