-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #853 from dhis2/catch-up-alpha-12-with-master
chore: catch up alpha 12 with master
- Loading branch information
Showing
14 changed files
with
133 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { reporter } = require('@dhis2/cli-helpers-engine') | ||
const fs = require('fs-extra') | ||
|
||
/** | ||
* Gets the original `entrypoints` property in d2.config.js | ||
* without applying defaults. Used to detect if there is actually | ||
* supposed to be an app entrypoint for this... app. Temporary until | ||
* the build process is redesigned to allow building plugins without | ||
* apps (LIBS-479) | ||
*/ | ||
const getOriginalEntrypoints = (paths) => { | ||
try { | ||
if (fs.existsSync(paths.config)) { | ||
reporter.debug('Loading d2 config at', paths.config) | ||
// NB: this import can be confounded by previous object mutations | ||
const originalConfig = require(paths.config) | ||
reporter.debug('loaded', originalConfig) | ||
return originalConfig.entryPoints // may be undefined | ||
} | ||
} catch (e) { | ||
reporter.error('Failed to load d2 config!') | ||
reporter.error(e) | ||
process.exit(1) | ||
} | ||
} | ||
exports.getOriginalEntrypoints = getOriginalEntrypoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.