Merge branch 'master' into gen2

This commit is contained in:
Alex A. Naanou 2022-04-15 23:39:02 +03:00
commit 211447af2c
2 changed files with 13 additions and 9 deletions

4
bootstrap.js vendored

File diff suppressed because one or more lines are too long

18
scripts/bootstrap.js vendored
View File

@ -12,6 +12,15 @@ var glob = require('glob')
var bootstrap = {} var bootstrap = {}
var BOOTSTRAP_TEMPLATE =
`// This file is generated automatically, all changes made here will be lost.
var Bootstrap = $BOOTSTRAP
typeof(module) != "undefined"
&& (module.exports = Bootstrap)`
// XXX add support for json... // XXX add support for json...
glob('bootstrap/**/*.@(tpl|md|css|html)') glob('bootstrap/**/*.@(tpl|md|css|html)')
.on('match', function(path){ .on('match', function(path){
@ -43,13 +52,8 @@ glob('bootstrap/**/*.@(tpl|md|css|html)')
}<!-- @filter(text) -->`, }<!-- @filter(text) -->`,
} } } }
var txt = '// This file is generated automatically, ' var txt = BOOTSTRAP_TEMPLATE
+'all changes made here will be lost.' .replace(/\$BOOTSTRAP/g, JSON.stringify(bootstrap))
+'\n\n'
+'var Bootstrap = ' + JSON.stringify(bootstrap)
+'\n\n'
+'typeof(module) != "undefined" \n'
+' && (module.exports = Bootstrap)'
console.log('Writing:', 'bootstrap.js') console.log('Writing:', 'bootstrap.js')
fs.writeFileSync('bootstrap.js', txt) }) fs.writeFileSync('bootstrap.js', txt) })