@@ -20,34 +20,37 @@ module.exports = function partialBundle(tasks, opts) {
20
20
var transformList = opts . transformList ;
21
21
var calendars = opts . calendars ;
22
22
23
- tasks . push ( function ( done ) {
24
- var partialIndex = mainIndex ;
23
+ // skip strict bundle which is no longer a partial bundle and has a special index file for regl traces
24
+ if ( name !== 'strict' ) {
25
+ tasks . push ( function ( done ) {
26
+ var partialIndex = mainIndex ;
25
27
26
- var all = [ 'calendars' ] . concat ( allTransforms ) . concat ( allTraces ) ;
27
- var includes = ( calendars ? [ 'calendars' ] : [ ] ) . concat ( transformList ) . concat ( traceList ) ;
28
- var excludes = all . filter ( function ( e ) { return includes . indexOf ( e ) === - 1 ; } ) ;
28
+ var all = [ 'calendars' ] . concat ( allTransforms ) . concat ( allTraces ) ;
29
+ var includes = ( calendars ? [ 'calendars' ] : [ ] ) . concat ( transformList ) . concat ( traceList ) ;
30
+ var excludes = all . filter ( function ( e ) { return includes . indexOf ( e ) === - 1 ; } ) ;
29
31
30
- excludes . forEach ( function ( t ) {
31
- var WHITESPACE_BEFORE = '\\s*' ;
32
- // remove require
33
- var newCode = partialIndex . replace (
34
- new RegExp (
35
- WHITESPACE_BEFORE +
36
- 'require\\(\'\\./' + t + '\'\\),' ,
37
- 'g' ) , ''
38
- ) ;
32
+ excludes . forEach ( function ( t ) {
33
+ var WHITESPACE_BEFORE = '\\s*' ;
34
+ // remove require
35
+ var newCode = partialIndex . replace (
36
+ new RegExp (
37
+ WHITESPACE_BEFORE +
38
+ 'require\\(\'\\./' + t + '\'\\),' ,
39
+ 'g' ) , ''
40
+ ) ;
39
41
40
- // test removal
41
- if ( newCode === partialIndex ) {
42
- console . error ( 'Unable to find and drop require for ' + t ) ;
43
- throw 'Error generating index for partial bundle!' ;
44
- }
42
+ // test removal
43
+ if ( newCode === partialIndex ) {
44
+ console . error ( 'Unable to find and drop require for ' + t ) ;
45
+ throw 'Error generating index for partial bundle!' ;
46
+ }
45
47
46
- partialIndex = newCode ;
47
- } ) ;
48
+ partialIndex = newCode ;
49
+ } ) ;
48
50
49
- common . writeFile ( index , partialIndex , done ) ;
50
- } ) ;
51
+ common . writeFile ( index , partialIndex , done ) ;
52
+ } ) ;
53
+ }
51
54
52
55
tasks . push ( function ( done ) {
53
56
var bundleOpts = {
0 commit comments