-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgruntfile.js
58 lines (55 loc) · 2.54 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
typescript: {
base: {
src: ['app/js/*.ts'],
dest: '',
options: {
module: 'commonjs',
target: 'es5',
declaration: false,
comments:true
}
},
forms: {
src: ['app/forms/**/*.ts'],
dest: '',
options: {
module: 'commonjs',
target: 'es5',
declaration: false,
comments:true
}
}
},
copy: {
main: {
files: [
// includes files within path
{src: ['app/bower_components/business-rules/dist/hobbies/i18n/*.json'], dest: 'app/i18n/hobbies/',flatten:true,filter: 'isFile',expand: true},
{src: ['app/bower_components/business-rules/dist/vacationApproval/i18n/*.json'], dest: 'app/i18n/vacationApproval/',flatten:true,filter: 'isFile',expand: true},
{src: ['app/bower_components/business-rules/dist/invoice/i18n/*.json'], dest: 'app/i18n/invoice/',flatten:true,filter: 'isFile',expand: true}
//{expand: true, src: ['src/customValidators/*.js'], dest: 'dist/customValidators', filter: 'isFile',flatten:true}
]
}
},
rename: {
main: {
files: [
// includes files within path
{src: ['app/bower_components/business-rules/dist/hobbies/business-rules.d.ts'], dest: 'typings/business-rules/hobbies.d.ts'},
{src: ['app/bower_components/business-rules/dist/vacationApproval/business-rules.d.ts'], dest: 'typings/business-rules/vacationApproval.d.ts'},
{src: ['app/bower_components/business-rules/dist/invoice/business-rules.d.ts'], dest: 'typings/business-rules/invoice.d.ts'}
//{expand: true, src: ['src/customValidators/*.js'], dest: 'dist/customValidators', filter: 'isFile',flatten:true}
]
}
}
});
grunt.loadNpmTasks('grunt-typescript');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-rename');
grunt.registerTask('app', ['typescript:base','typescript:forms']);
grunt.registerTask('i18n', ['copy:main']);
grunt.registerTask('typings', ['rename:main']);
};