Skip to content

Commit

Permalink
feat: generate d2.config.json from d2.config.js (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgee committed Oct 19, 2020
1 parent 5ea58cf commit 2046074
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/src/lib/generateManifest.js
Expand Up @@ -32,5 +32,12 @@ module.exports = (paths, config, publicUrl) => {

reporter.debug('Generated manifest', manifest)

// For backwards compatibility, WILL BE DEPRECATED
fs.writeJsonSync(paths.buildAppManifest, manifest, { spaces: 2 })

// Write config json
const appConfig = { ...config }
delete appConfig['entryPoints']

fs.writeJsonSync(paths.buildAppConfigJson, appConfig, { spaces: 2 })
}
1 change: 1 addition & 0 deletions cli/src/lib/paths.js
Expand Up @@ -48,6 +48,7 @@ module.exports = (cwd = process.cwd()) => {
buildOutput: path.join(base, './build'),
buildAppOutput: path.join(base, './build/app'),
buildAppManifest: path.join(base, './build/app/manifest.webapp'),
buildAppConfigJson: path.join(base, './build/app/d2.config.json'),
buildAppBundle: path.join(
base,
'./build/bundle/dhis2-{{name}}-{{version}}.zip'
Expand Down

0 comments on commit 2046074

Please sign in to comment.