peertube-plugin-ncd-sell-st.../scripts/build.js

21 lines
457 B
JavaScript
Raw Normal View History

2023-12-13 00:31:35 +00:00
const path = require('path')
const esbuild = require('esbuild')
const clientFiles = [
'common-client-plugin.js'
]
const configs = clientFiles.map(f => ({
entryPoints: [ path.resolve(__dirname, '..', 'client', f) ],
bundle: true,
minify: true,
format: 'esm',
target: 'safari11',
outfile: path.resolve(__dirname, '..', 'dist', f),
}))
const promises = configs.map(c => esbuild.build(c))
Promise.all(promises)
.catch(() => process.exit(1))