Skip to content

Commit

Permalink
feat(init): set direction: 'auto' and import locales for new apps [LI…
Browse files Browse the repository at this point in the history
…BS-645] (#867)

* feat: add direction: 'auto' to new apps' config

* feat: import locales from boilerplate entrypoint
  • Loading branch information
KaiVandivier authored Aug 12, 2024
1 parent 7cc9afb commit 4eda4a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cli/config/d2ConfigDefaults.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* Note that these values are different from the boilerplate files that
* are copied when using `d2-app-scripts init` -- these are used as defaults
* when parsing d2 config of existing apps
*
* The boilerplate files live in /config/init/
*/

const defaultsApp = {
type: 'app',

Expand Down
2 changes: 2 additions & 0 deletions cli/config/init/d2.config.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const config = {
entryPoints: {
app: './src/App.jsx',
},

direction: 'auto',
}

module.exports = config
2 changes: 2 additions & 0 deletions cli/config/init/entrypoint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { useDataQuery } from '@dhis2/app-runtime'
import i18n from '@dhis2/d2-i18n'
import React from 'react'
import classes from './App.module.css'
// './locales' will be populated after running start or build scripts
import './locales'

const query = {
me: {
Expand Down

0 comments on commit 4eda4a9

Please sign in to comment.