mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-08-21 18:11:50 +00:00
build
config
core
assets
config
emoji
exports
font
language
memory-pow
public
server
sound
src
tooling
build.js
generateBuildConfig.js
generateES5BuildConfig.js
utils.js
watch-inlines.js
watch.js
translate
ui-core.js
crypto
img
lib
locales
plugins
scripts
snap
splash
.editorconfig
.gitattributes
.gitignore
CONTRIBUTING.md
LICENSE
README.md
build-setup.js
build.bat
build.js
build.sh
electron-builder.yml
electron.js
package-lock.json
package.json
run_server.bat
server.js
set-up-snap.sh
watch-inline.js
watch.js
35 lines
749 B
JavaScript
35 lines
749 B
JavaScript
const rollup = require('rollup')
|
|
|
|
async function writeBundle(bundle, outputOptions) {
|
|
await bundle.generate(outputOptions)
|
|
await bundle.write(outputOptions)
|
|
}
|
|
|
|
async function buildInline(conf) {
|
|
const bundle = await rollup.rollup(conf.inputOptions).catch(err => {
|
|
throw err
|
|
})
|
|
|
|
await writeBundle(bundle, conf.outputOptions)
|
|
|
|
console.log('BUILD CORE ==> Bundling Done 🎉')
|
|
}
|
|
|
|
async function build(options, outputs, outputOptions, inputOptions, inlineConfigs) {
|
|
const bundle = await rollup.rollup(inputOptions).catch(err => {
|
|
throw err
|
|
})
|
|
|
|
for (const option of outputs) {
|
|
await writeBundle(bundle, {
|
|
...outputOptions,
|
|
...option
|
|
})
|
|
}
|
|
|
|
for (const conf of inlineConfigs) {
|
|
await buildInline(conf)
|
|
}
|
|
}
|
|
|
|
module.exports = build |