@@ -20,34 +20,37 @@ module.exports = function partialBundle(tasks, opts) {
2020 var transformList = opts . transformList ;
2121 var calendars = opts . calendars ;
2222
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 ;
2527
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 ; } ) ;
2931
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+ ) ;
3941
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+ }
4547
46- partialIndex = newCode ;
47- } ) ;
48+ partialIndex = newCode ;
49+ } ) ;
4850
49- common . writeFile ( index , partialIndex , done ) ;
50- } ) ;
51+ common . writeFile ( index , partialIndex , done ) ;
52+ } ) ;
53+ }
5154
5255 tasks . push ( function ( done ) {
5356 var bundleOpts = {
0 commit comments