File tree Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,38 @@ module.exports = function(grunt) {
3
3
grunt . loadNpmTasks ( 'grunt-contrib-concat' ) ;
4
4
5
5
var license = grunt . file . read ( 'LICENSE_min' ) ;
6
- var basefiles = [
7
- 'closure-primitives/base.js' ,
8
- 'define/typedarray/hybrid.js' ,
9
- 'src/*.js'
10
- ] ;
6
+ var basefiles = [ ] ;
11
7
var config = grunt . file . readJSON ( "build.json" ) ;
12
8
var targets = Object . keys ( config ) ;
13
9
10
+
11
+ // basefiles
12
+ basefiles . push ( 'closure-primitives/base.js' ) ;
13
+
14
+ switch ( grunt . option ( 'typedarray' ) ) {
15
+ case 'use' :
16
+ console . log ( 'USE_TYPEDARRAY=true' ) ;
17
+ basefiles . push (
18
+ 'define/typedarray/use.js'
19
+ ) ;
20
+ break ;
21
+ case 'no' :
22
+ console . log ( 'USE_TYPEDARRAY=false' ) ;
23
+ basefiles . push (
24
+ 'define/typedarray/no.js'
25
+ ) ;
26
+ break ;
27
+ case 'hypbrid' : /* FALLTHROUGH */
28
+ default :
29
+ console . log ( 'USE_TYPEDARRAY=hybrid' ) ;
30
+ basefiles . push (
31
+ 'define/typedarray/hybrid.js'
32
+ ) ;
33
+ break ;
34
+ }
35
+
36
+ basefiles . push ( 'src/*.js' ) ;
37
+
14
38
grunt . initConfig ( {
15
39
closureDepsWriter : {
16
40
options : {
You can’t perform that action at this time.
0 commit comments