4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00
AlphaX-Projects fa29ff4c43 Update UI
Refactor and added new functioms
2024-05-08 13:16:23 +02:00

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