-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGruntfile.js
More file actions
53 lines (50 loc) · 1.49 KB
/
Gruntfile.js
File metadata and controls
53 lines (50 loc) · 1.49 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
type: {
all: {
files: [
{ src: ['src/*.ts', 'test/*.ts'], dest: 'build' }
],
options: {
sourcemap: false,
target: 'es5',
nolib: false,
declaration: false,
comments: false,
module: 'commonjs'
}
}
},
browserify: {
dist: {
files: {
'interpreter.js': ['build/src/*.js']
}
}
},
nodeunit: {
all: ['build/test/*.js']
},
uglify: {
all: {
options: {
banner: '/*! <%= pkg.name %>: <%= grunt.template.today("mm-dd-yyyy") %> */\n',
mangle: false
},
files: {
'interpreter.min.js': [
'interpreter.js'
]
}
}
}
});
grunt.loadNpmTasks('grunt-type');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-browserify');
grunt.registerTask('default', ['type', 'browserify', 'uglify']);
grunt.registerTask('test', ['type', 'nodeunit']);
};