forked from ejacquier/sequenx-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
115 lines (110 loc) · 2.96 KB
/
Gruntfile.js
File metadata and controls
115 lines (110 loc) · 2.96 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
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
114
115
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */'
},
main: {
files: {
'dist/sequenx.min.js': ['dist/sequenx.js'],
'dist/sequenx.rx.min.js': ['dist/sequenx.rx.js']
}
},
},
ts: {
release: {
src: ["src/sequencing/**/*.ts", "typings/**/*.ts", "!node_modules/**/*.ts"],
out: "dist/sequenx.js",
options: {
sourceMap: false,
declaration: true,
fast: 'never',
noLib: false
}
},
release_rx: {
src: ["src/sequencing/**/*.ts", "src/rx/**/*.ts", "typings/**/*.ts", "!node_modules/**/*.ts"],
out: "dist/sequenx.rx.js",
options: {
sourceMap: false,
declaration: true,
fast: 'never',
noLib: false
}
},
debug: {
src: ["src/**/*.ts", "typings/**/*.ts", "!node_modules/**/*.ts"],
out: "js/sequenx.js",
options: {
sourceMap: true,
declaration: true,
noLib: false
}
},
debug_rx: {
src: ["src/**/*.ts", "typings/**/*.ts", "!node_modules/**/*.ts"],
out: "js/sequenx.extend.rx.js",
options: {
sourceMap: true,
declaration: true,
noLib: false
}
}
},
mochacli: {
options: {
bail: false,
colors: true,
//reporter:"nyan"
},
all: ['test/*test.js']
},
mocha_istanbul: {
src: 'test',
options: {
excludes: ["rx.lite.js"]
}
},
concat: {
debug_node: {
options: {
separator: '\n',
sourceMap: true
},
src: ['js/sequenx.js', 'src/nodejs.js'],
dest: 'js/sequenx.js',
},
node: {
options: {
separator: '\n',
sourceMap: false
},
src: ['dist/sequenx.js', 'src/nodejs.js'],
dest: 'dist/sequenx.js',
},
node_rx: {
options: {
separator: '\n',
sourceMap: false
},
src: ['dist/sequenx.rx.js', 'src/nodejs.js'],
dest: 'dist/sequenx.rx.js',
},
},
clean: ['dist']
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-ts');
grunt.loadNpmTasks('grunt-mocha-cli');
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('release', ["clean", 'ts:release', 'ts:release_rx', 'concat:node', 'concat:node_rx', 'uglify']);
grunt.registerTask('debug', ['ts:debug', 'concat:debug_node']);
grunt.registerTask('node', ['ts', 'concat:node']);
grunt.registerTask('test', ['debug', 'mochacli']);
grunt.registerTask('test_coverage', ['debug', 'mocha_istanbul']);
};