-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add new templates and options to @dhis2/create-app #635
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
Conversation
# [5.3.0-alpha.1](v5.2.1...v5.3.0-alpha.1) (2026-01-05) ### Features * add new templates and options to @dhis2/create-app ([6d7fccd](6d7fccd))
# [5.3.0-alpha.2](v5.3.0-alpha.1...v5.3.0-alpha.2) (2026-01-05) ### Bug Fixes * ensure latest version for dhis2 dependencies ([2505d67](2505d67))
# [5.3.0-alpha.3](v5.3.0-alpha.2...v5.3.0-alpha.3) (2026-01-06) ### Bug Fixes * use templates from file system not zip ([e5ce2c4](e5ce2c4))
as it can be inferred from command run
# [5.3.0-alpha.4](v5.3.0-alpha.3...v5.3.0-alpha.4) (2026-01-06) ### Bug Fixes * drop package manager question ([9bf5926](9bf5926))
KaiVandivier
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! 🙌 A couple comments and suggestions in here, but I'll approve so you can merge when ready
In addition to the other comments:
- I noticed
.gitignoreisn't ending up in the scaffolded apps for some reason 🤔 - Are you interested in updating
cli-app-scripts,ui, andapp-runtimeto the latest versions once bootstrapped? Or waiting untilcli-app-scriptsis off alpha?
packages/create-app/templates/template-ts-dataelements-react-router/src/App.module.css
Outdated
Show resolved
Hide resolved
packages/create-app/templates/template-ts-dataelements-react-router/src/App.module.css
Outdated
Show resolved
Hide resolved
packages/create-app/templates/template-ts-dataelements-react-router/src/App.module.css
Outdated
Show resolved
Hide resolved
packages/create-app/templates/template-ts-dataelements-react-router/src/AppWrapper.tsx
Outdated
Show resolved
Hide resolved
# [5.3.0-alpha.5](v5.3.0-alpha.4...v5.3.0-alpha.5) (2026-01-07) ### Bug Fixes * skip language and template questions when args provided ([7a2b5cf](7a2b5cf))
I will update cli-app-scripts once it's off alpha - I had a last step to ugprade to latest, but got rid of it and I thought to keep the updates manual for now. It's easy enough since it's not a zip file now, and there is a chance some of the dependencies are broken. Maybe I can add some tests/sanity checks at some point, and then we'd have more confidence bumping dependencies? |
# [5.3.0-alpha.6](v5.3.0-alpha.5...v5.3.0-alpha.6) (2026-01-07) ### Bug Fixes * update yarn and npm lock files ([d9f5d0b](d9f5d0b))
|
🎉 This PR is included in version 5.3.0-alpha.6 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [5.3.0-alpha.7](v5.3.0-alpha.6...v5.3.0-alpha.7) (2026-01-07) ### Bug Fixes * fix the pnpm semantic-release step ([3656df4](3656df4))
|
🎉 This PR is included in version 5.3.0-alpha.7 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [5.3.0-alpha.8](v5.3.0-alpha.7...v5.3.0-alpha.8) (2026-01-07) ### Bug Fixes * ensure gitignore is part of the scaffolded template ([212544b](212544b))
|
🎉 This PR is included in version 5.3.0-alpha.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
never mind @kai - managed to reproduce the issue with gitignore |
|
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |



This PR updates the npm-create command used to scaffold a new DHIS2 web app to change the default template, and add more options and flexibility.
The changes fall into two categories:
You can test these changes from alpha channel of the CLI with
npm create @dhis2/app@alphaThe new templates
This PR updates the default template that is provided out of the box to give a starting point that is more helpful, and less basic, than the previous version. These templates (and the defaults) are a result of conversations with the Dev Champions, and own experience of the amount of work we seem to have to do with the previous default templates to get them to a reaonsable working state.
The defaults aim to give a better starting point without being too opinionated, but also be pragmatic and use the template as a way to promote the rest of our app-platform eco-system - it's a lot of unnecessary work to get basics like the UI library and runtime query figured out right now.
Default template
The default template now shows:
Like before, it allows choosing a package manager
pnpm(default),npmoryarn, and a choice betweenTypeScript(default) andJavaScript.In addition, it uses some of the features of the platform by default:
@aliases.Secondary template (with react-router)
In addition to the basic template, there is an additional template with React Router.
Changes to how it works
ToDO.. add more details
The PR also changes how things work under the hood - this is less important imo, and I am happy to change it back if we still see a value in keeping and updating
d2 app script initfor example. These are the changes :app script init- the logic to scaffold was moved to the npm-create CLI directly. This seems to me just another unnecessary level of indirection - we can keepapp script initfor backwards compatibility, but it's much simpler to have the scaffolding logic, and easier to work with, directly in the module now responsible for scaffolding new apps.