Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hyoo-ru/mam_mol
Browse files Browse the repository at this point in the history
  • Loading branch information
spleekz committed Jun 30, 2023
2 parents 8fd592b + bbb61cd commit 6b3efd6
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions build/build.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ namespace $ {
if( !bundle || bundle === 'readme.md' ) {
res = res.concat( this.bundleReadmeMd( { path , exclude : [ 'web' ] } ) )
}

if( !bundle || bundle === 'index.html' ) {
res = res.concat( this.bundleIndexHtml( { path } ) )
}
Expand Down Expand Up @@ -1302,14 +1302,23 @@ namespace $ {

const start = Date.now()
const html = pack.resolve( 'index.html' )
const tree = pack.resolve( 'index.xml.tree' )
const target = pack.resolve( '-/index.html' )

if( tree.exists() ) {
const xml_tree = this.$.$mol_tree2_from_string( tree.text() )
const text = this.$.$mol_tree2_xml_to_text( xml_tree )
const xml = this.$.$mol_tree2_text_to_string( text )
target.text( xml )
} else if( html.exists() ) {
target.text( html.text() )
}

if ( html.exists() ) {
const html_target = pack.resolve( '-/index.html' )
html_target.text( html.text() )
targets.push( html_target )
this.logBundle( html_target , Date.now() - start )
if( target.exists() ) {
targets.push( target )
this.logBundle( target, Date.now() - start )
}

return targets
}

Expand Down

0 comments on commit 6b3efd6

Please sign in to comment.