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: generate a manifest, set PUBLIC_URL, and output a compliant zip #36

Merged
merged 10 commits into from
Sep 10, 2019

Conversation

amcgee
Copy link
Member

@amcgee amcgee commented Sep 5, 2019

This adds manifest generation to the build script, automatically sets the PUBLIC_URL passed to CRA so that it will be installable on a DHIS2 instance, and outputs a DHIS2-compliant zip archive of the production build to ./build/bundle/dhis2-{name}-{version}.zip. This file can be uploaded directly to the App Management App

Future enhancements:

  • Support custom icons
  • Rewrite App Management App in AppShell
  • Support other "appTypes" - Dashboard apps, for instance.
  • Dump the antiquated activities.dhis from the manifest
  • Revamp how the core serves apps - they are really ugly under, i.e. /api/apps/My-Simple-Application/ rather than /apps/simple or something equally pleasing to the eye

@netlify
Copy link

netlify bot commented Sep 5, 2019

Deploy preview for dhis2-app-platform ready!

Built with commit f608185

https://deploy-preview-36--dhis2-app-platform.netlify.com

@amcgee
Copy link
Member Author

amcgee commented Sep 5, 2019

Thanks to @awgaan for pointing out the deployment issue!

@amcgee
Copy link
Member Author

amcgee commented Sep 5, 2019

Closes #26

Copy link
Contributor

@varl varl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also works on my machine. 👍

Copy link

@erikarenhill erikarenhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might not matter so much but the build output also contain a superflous manifest.json with the "Create React App Sample" template, otherwise it also works for me with the webapp manifest, tested uploading the zip to an instance without any problems

cli/src/lib/parseConfig.js Outdated Show resolved Hide resolved
@amcgee
Copy link
Member Author

amcgee commented Sep 6, 2019

It might not matter so much but the build output also contain a superflous manifest.json with the "Create React App Sample" template

Yeah, I thought about maybe overwriting that with the correct values but will remove it for now.

@amcgee
Copy link
Member Author

amcgee commented Sep 10, 2019

Since this was approved by @varl and I addressed @erikarenhill 's comment I'm going to merge this after conflict resolution. Speak now if that's a problem!

@amcgee amcgee merged commit 243454a into master Sep 10, 2019
@amcgee amcgee deleted the feat/build-app-zip branch September 10, 2019 09:54
dhis2-bot added a commit that referenced this pull request Sep 10, 2019
# [1.3.0](v1.2.3...v1.3.0) (2019-09-10)

### Features

* generate a manifest, set PUBLIC_URL, and output a compliant zip ([#36](#36)) ([243454a](243454a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants