Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(init): set direction: 'auto' and import locales for new apps [LIBS-645] #867

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading