@@ -656,6 +656,7 @@ namespace $ {
656656 this . bundle ( [ path , 'web.js' ] )
657657 this . bundle ( [ path , 'web.test.js' ] )
658658 this . bundle ( [ path , 'web.test.html' ] )
659+ this . bundle ( [ path , 'web.baza' ] )
659660 this . bundle ( [ path , 'web.view.tree' ] )
660661 this . bundle ( [ path , 'web.meta.tree' ] )
661662 this . bundle ( [ path , 'web.locale=en.json' ] )
@@ -673,6 +674,7 @@ namespace $ {
673674 this . bundle ( [ path , 'node.deps.json' ] )
674675 this . bundle ( [ path , 'node.js' ] )
675676 this . bundle ( [ path , 'node.test.js' ] )
677+ this . bundle ( [ path , 'node.baza' ] )
676678 this . bundle ( [ path , 'node.view.tree' ] )
677679 this . bundle ( [ path , 'node.meta.tree' ] )
678680 this . bundle ( [ path , 'node.locale=en.json' ] )
@@ -716,7 +718,7 @@ namespace $ {
716718 var stages = [ 'test' , 'dev' ]
717719 if ( bundle ) {
718720
719- var [ bundle , tags , type , locale ] = / ^ ( .* ?) (?: \. ( a u d i t \. j s | t e s t \. j s | t e s t \. h t m l | j s | c s s | d e p s \. j s o n | l o c a l e = ( \w + ) \. j s o n ) ) ? $ / . exec (
721+ var [ bundle , tags , type , locale ] = / ^ ( .* ?) (?: \. ( a u d i t \. j s | t e s t \. j s | t e s t \. h t m l | j s | c s s | d e p s \. j s o n | l o c a l e = ( \w + ) \. j s o n | b a z a ) ) ? $ / . exec (
720722 bundle
721723 ) !
722724
@@ -757,6 +759,9 @@ namespace $ {
757759 if ( ! type || type === 'view.tree' ) {
758760 res = res . concat ( this . bundleViewTree ( { path , exclude , bundle : env } ) )
759761 }
762+ if ( ! type || type === 'baza' ) {
763+ res = res . concat ( this . bundleBaza ( { path , exclude , bundle : env } ) )
764+ }
760765 if ( ! type || type === 'meta.tree' ) {
761766 res = res . concat ( this . bundleMetaTree ( { path , exclude , bundle : env } ) )
762767 }
@@ -1101,6 +1106,25 @@ namespace $ {
11011106 return [ target ]
11021107 }
11031108
1109+ @ $mol_mem_key
1110+ bundleBaza ( { path , exclude , bundle } : { path : string , exclude ? : readonly string [ ] , bundle : string } ) : $mol_file [ ] {
1111+
1112+ const start = this . now ( )
1113+ const pack = $mol_file . absolute ( path )
1114+
1115+ const target = pack . resolve ( `-/${ bundle } .baza` )
1116+
1117+ const sources = this . sourcesAll ( [ path , exclude ] )
1118+ . filter ( src => / b a z a $ / . test ( src . ext ( ) ) )
1119+ if ( sources . length === 0 ) return [ ]
1120+
1121+ target . buffer ( new Uint8Array ( sources . flatMap ( src => [ ... src . buffer ( ) ] ) ) )
1122+
1123+ this . logBundle ( target , Date . now ( ) - start )
1124+ return [ target ]
1125+
1126+ }
1127+
11041128 @ $mol_mem_key
11051129 bundleMetaTree ( { path , exclude , bundle } : { path : string , exclude ? : readonly string [ ] , bundle : string } ) : $mol_file [ ] {
11061130 const start = this . now ( )
0 commit comments