mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-08-06 10:41:31 +00:00
build
config
img
qortal-ui-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
.eslintignore
.eslintrc.json
package.json
ui-core.js
qortal-ui-crypto
qortal-ui-plugins
scripts
snap
.editorconfig
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
build-setup.js
build.bat
build.js
build.sh
electron-builder.yml
electron.js
install-dependencies.sh
package.json
push-updates-with-travis-build.sh
run_server.bat
server.js
set-up-snap.sh
update-package-json.js
watch-inline.js
watch.js
35 lines
832 B
JavaScript
35 lines
832 B
JavaScript
const rollup = require('rollup')
|
|
|
|
async function watch(options, outputs, outputOptions, inputOptions) {
|
|
|
|
const watchOptions = {
|
|
...inputOptions,
|
|
output: outputs.map(option => {
|
|
return {
|
|
...outputOptions,
|
|
...option
|
|
}
|
|
}),
|
|
watch: {
|
|
}
|
|
}
|
|
const watcher = rollup.watch(watchOptions)
|
|
watcher.on('event', event => {
|
|
})
|
|
}
|
|
|
|
async function writeBundle(bundle, outputOptions) {
|
|
await bundle.generate(outputOptions)
|
|
await bundle.write(outputOptions)
|
|
console.log('WATCH CORE ==> Write Bundle : Done 🎉');
|
|
}
|
|
|
|
async function buildInline(conf) {
|
|
const bundle = await rollup.rollup(conf.inputOptions).catch(err => {
|
|
throw err
|
|
})
|
|
await writeBundle(bundle, conf.outputOptions)
|
|
}
|
|
|
|
module.exports = watch
|