-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntFile.js
More file actions
54 lines (51 loc) · 1.66 KB
/
GruntFile.js
File metadata and controls
54 lines (51 loc) · 1.66 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
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-zip');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
ts: {
default: {
options: {
sourceMap: false,
comments: true,
target: 'es3'
},
src: ["src/propjet.d.ts", "src/propjet.ts"]
}
},
uglify: {
default: {
files: {
'src/propjet.min.js': ['src/propjet.js']
}
}
},
concat: {
default: {
options: {
banner: '/*!\r\n' +
' <%= pkg.name %>.js v<%= pkg.version %>\r\n' +
' (c) 2018 <%= pkg.author %>. <%= pkg.homepage %>\r\n' +
' License: <%= pkg.license %>\r\n' +
'*/\r\n'
},
files: {
'dist/propjet.js': ['src/propjet.js'],
'dist/propjet.min.js': ['src/propjet.min.js'],
'dist/propjet.d.ts': ['src/propjet.d.ts'],
}
}
},
zip: {
default: {
cwd: 'dist/',
src: ['dist/*.*'],
dest: 'PropjetJS.zip',
compression: 'DEFLATE'
}
}
});
grunt.registerTask('default', ['ts', 'uglify', 'concat', 'zip']);
}