-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
59 lines (56 loc) · 1.83 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
module.exports = function (grunt) {
grunt.initConfig({
concat: {
base: {
files: {
'build/objective-three.js': ['lib/vendor/node.events.js',
'src/index.js',
// 'src/geo_to_JSON.js',
'src/Display.js',
'src/MatProxy.js',
'src/fast_geo_merge.js',
'src/Infinite.js',
'src/RenderObject.js']
}
},
test_scene: {
files: {
'test_scene/public/js/o3.js': ['o3.js']
}
}
},
umd: {
all: {
src: 'build/objective-three.js',
dest: 'o3.js', // optional, if missing the src will be used
template: 'unit', // optional; a template from templates subdir can be specified by name (e.g. 'umd');
// if missing the templates/umd.hbs file will be used
objectToExport: 'O3', // optional, internal object that will be exported
amdModuleId: 'O3', // optional, if missing the AMD module will be anonymous
globalAlias: 'O3', // optional, changes the name of the global variable
deps: { // optional
'default': ['_', 'THREE', 'Fools'],
cjs: ['underscore', 'three', 'fools']
}
}
},
node_tap: {
test: {
options: {
outputType: 'tap', // tap, failures, stats
outputTo: 'console' // or file
// outputFilePath: '/tmp/out.log' // path for output file,
// only makes sense with outputTo 'file'
},
files: {
'tests': ['./tests/display.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-umd');
grunt.loadNpmTasks('grunt-node-tap');
// the default task can be run just by typing "grunt" on the command line
grunt.registerTask('default', ['concat:base', 'umd:all', 'concat:test_scene']);
};