Allow building single webpack modules

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-10-16 09:05:16 +02:00
parent 8153bd00a5
commit a2b728972c
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -17,20 +17,35 @@ const twofactor_backupscodes = require('./apps/twofactor_backupcodes/webpack')
const updatenotifications = require('./apps/updatenotification/webpack')
const workflowengine = require('./apps/workflowengine/webpack')
const modules = {
core,
settings,
accessibility,
comments,
files_sharing,
files_trashbin,
files_versions,
oauth2,
systemtags,
twofactor_backupscodes,
updatenotifications,
workflowengine
}
const modulesToBuild = () => {
const MODULE = process.env.MODULE
if (MODULE) {
if (!modules[MODULE]) {
throw new Error(`No module "${MODULE}" found`)
}
return [ modules[MODULE] ]
}
return Object.values(modules)
}
module.exports = []
.concat(
core,
settings,
accessibility,
comments,
files_sharing,
files_trashbin,
files_versions,
oauth2,
systemtags,
twofactor_backupscodes,
updatenotifications,
workflowengine
...modulesToBuild()
)
.map(config => merge.smart({
module: {