Skip to content

Commit

Permalink
fix: pull description from package.json if not specified in config fi…
Browse files Browse the repository at this point in the history
…le (#286)
  • Loading branch information
amcgee committed Jan 31, 2020
1 parent 7e22ab1 commit 216d5d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions cli/src/lib/parseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const parseConfig = paths => {
config.name = config.name || pkg.name
config.version = config.version || pkg.version
config.author = config.author || parseAuthor(pkg.author)
config.description = config.description || pkg.description
}
config.title = config.title || config.name

Expand Down
22 changes: 11 additions & 11 deletions docs/config/d2-config-js-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ All properties are technically optional, but it is recommended to set them expli

The following configuration properties are supported:

| Property | Type | Default | Description |
| :-------------------: | :-------: | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type** | _string_ | **app** | Either **app** or **lib** |
| **name** | _string_ | `pkg.name` | A short, machine-readable unique name for this app |
| **title** | _string_ | `config.name` | The human-readable application title, which will appear in the HeaderBar |
| **description** | _string_ | | A full-length description of the application |
| **author** | _string_ | `pkg.author` | The name of the developer to include in the DHIS2 manifest |
| **entryPoints.app** | _string_ | **./src/App** | The path to the application entrypoint (not used for libraries) |
| **entryPoints.index** | _string_ | **./src/index** | The path to the library entrypoint (not used for applications) |
| **coreApp** | _boolean_ | **false** | **ADVANCED** If true, build an app artifact to be included as a root-level core application |
| **standalone** | _boolean_ | **false** | **ADVANCED** If true, do NOT include a static BaseURL in the production app artifact. This includes the `Server` field in the login dialog, which is usually hidden and pre-configured in production. |
| Property | Type | Default | Description |
| :-------------------: | :-------: | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type** | _string_ | **app** | Either **app** or **lib** |
| **name** | _string_ | `pkg.name` | A short, machine-readable unique name for this app |
| **title** | _string_ | `config.name` | The human-readable application title, which will appear in the HeaderBar |
| **description** | _string_ | `pkg.description` | A full-length description of the application |
| **author** | _string_ | `pkg.author` | The name of the developer to include in the DHIS2 manifest |
| **entryPoints.app** | _string_ | **./src/App** | The path to the application entrypoint (not used for libraries) |
| **entryPoints.index** | _string_ | **./src/index** | The path to the library entrypoint (not used for applications) |
| **coreApp** | _boolean_ | **false** | **ADVANCED** If true, build an app artifact to be included as a root-level core application |
| **standalone** | _boolean_ | **false** | **ADVANCED** If true, do NOT include a static BaseURL in the production app artifact. This includes the `Server` field in the login dialog, which is usually hidden and pre-configured in production. |

> _Note_: Dynamic defaults above may reference `pkg` (a property of the local `package.json` file) or `config` (another property within `d2.config.js`).
Expand Down

0 comments on commit 216d5d0

Please sign in to comment.