-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
113 lines (107 loc) · 1.95 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
ts: {
default : {
src: ["app/**/*.ts", "!app/libs/**/*"],
outDir: "public/build",
},
options : {
target: "es5",
module: "commonjs",
sourceMMap: true,
declaration: true
}
},
tslint: {
options : {
configuration: "etc/conf/dev_tslint.json"
},
default : {
src: ["app/**/*.ts", "!app/libs/**/*"]
}
},
injector: {
options : {
addRootSlash: false,
ignorePath: "public"
},
default : {
files: {
'public/index.html' : ['bower.json',
'public/build/**/*.js',
'public/bower_components/bootstrap/dist/css/bootstrap.css',
'public/bower_components/ngtoast/dist/ngToast.css',
'public/bower_components/ngtoast/dist/ngToast-animations.css',
'public/css/*.css']
}
}
},
copy: {
default : {
files: [
{expand: true, flatten: true, src: ['app/index.html'], dest: 'public'}]
}
},
watch: {
default: {
files: ['app/**/*.ts', 'app/*.html', "!app/libs/**/*"],
tasks: ['build']
}
},
mkdir: {
dist: {
options: {
create: ['etc/dist']
}
}
},
compress: {
default: {
options: {
archive: 'etc/dist/reims-web.zip'
},
files: [
{
src: [
'public/**',
'!public/bower_components/**',
'.bowerrc',
'package.json',
'bower.json',
'server.js',
'etc/scripts/*'
],
}
]
}
},
'github-release': {
options: {
repository: 'jboreiko/reims-web',
auth: {
user: 'jboreiko',
password: process.env.GITHUB_TOKEN
}
},
files: {
src: ['etc/dist/reims-web.zip']
}
}
});
grunt.registerTask("release", [
"build",
"mkdir:dist",
"compress",
"github-release"
]);
grunt.registerTask("build", [
"tslint",
"ts",
"copy",
"injector"
]);
grunt.registerTask("default", [
"watch"
]);
};