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

18
scripts/bootstrap.js vendored
View File

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