build: migrate build system to rollup & rm app/ from repository
This commit is contained in:
parent
291b1a0752
commit
bdfade96a7
65 changed files with 327 additions and 362 deletions
58
scripts/server.rollup.config.js
Normal file
58
scripts/server.rollup.config.js
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
var commonjs = require('@rollup/plugin-commonjs'),
|
||||
nodeResolve = require('@rollup/plugin-node-resolve'),
|
||||
json = require('@rollup/plugin-json'),
|
||||
babel = require('@rollup/plugin-babel'),
|
||||
terser = require('@rollup/plugin-terser'),
|
||||
copy = require('rollup-plugin-copy'),
|
||||
license = require('rollup-plugin-license'),
|
||||
package = require('../package.json'),
|
||||
path = require('path')
|
||||
|
||||
module.exports = {
|
||||
input: 'src/server/index.js',
|
||||
output: [
|
||||
{
|
||||
file: 'app/server/open-stage-control-server.js',
|
||||
inlineDynamicImports: true,
|
||||
format: 'commonjs',
|
||||
strict: false,
|
||||
name: '_',
|
||||
},
|
||||
],
|
||||
external: ['electron'],
|
||||
watch: {
|
||||
clearScreen: false
|
||||
},
|
||||
plugins: [
|
||||
json(),
|
||||
commonjs({
|
||||
ignoreGlobal: true,
|
||||
ignoreDynamicRequires: true
|
||||
}),
|
||||
nodeResolve({
|
||||
preferBuiltins: true
|
||||
}),
|
||||
terser({
|
||||
sourceMap: true,
|
||||
output: {
|
||||
comments: false,
|
||||
},
|
||||
}),
|
||||
license({
|
||||
banner: {
|
||||
content: {
|
||||
file: path.join(__dirname, 'license-header.txt'),
|
||||
},
|
||||
}
|
||||
}),
|
||||
copy({
|
||||
targets: [
|
||||
{src: 'src/app/index.js', dest: 'app/'},
|
||||
{src: 'src/python/*', dest: 'app/server/python/'},
|
||||
{src: 'node_modules/fsevents/fsevents.node', dest: 'app/server/'},
|
||||
{src: 'LICENSE', dest: 'app/'},
|
||||
{src: 'package.json', dest: 'app/'},
|
||||
]
|
||||
})
|
||||
]
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue