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

calculate sizes on packaging and show in registry UI if available #1363

Merged
merged 5 commits into from
Apr 7, 2024

Conversation

ricardo-devis-agullo
Copy link
Collaborator

This adds two new fields in package.json when packaged by OC.

oc.files.template.size: number: size in bytes of the template (including all js files like react-component.js if using older templates).
oc.files.dataProvider.size?: number: size in bytes of the server.js (if exists).

Then, if at least there is one component in the component list with the size defined, a new column will appear called "Size" that will show the size in kbs of the template. On the info will also show on the properties.

For now I'm not showing the size of the server on the Registry UI as I'm not sure is as valuable, but I'm saving it on package.json just in case I want to add it in the future.

@ricardo-devis-agullo ricardo-devis-agullo merged commit e812294 into master Apr 7, 2024
3 checks passed
@ricardo-devis-agullo ricardo-devis-agullo deleted the calculate-sizes branch April 7, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant