-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add web frontend as an option of zpm new
, don't generate it on zpm bundle
#109
Comments
When you say |
No, not the project directory; the zapp itself. I think my confusion was in the use of So to recap:
This would easily allow the developer to generate UI defaults (but only if needed) and then customize them. |
The difference between the
I think we need this functionality, we want to specify two lists: the files to include in the zapp and the (subset) of these files that we want to see unpacked when it is deployed. Having the |
What you're suggesting seems to require that the user will add the auto-generated |
Okay, in that case it makes sense to keep them as separate sections. So that's fine. But I still think file inclusion should be explicit. For instance, if I remove the
|
Yes, that it what I'm suggesting. But there's more to it than that: If we auto-generate Explicit is better than implicit. |
I think my suggestion in #141 would help: ui:
- "<index.html>"
- "<style.css>"
- "<zerocloud.js>" The user can then remove things from this list as desired or leave the section out completely. With no section, no UI files are added. |
Yes, and I believe we should be making such a promise at some point. We can do all sorts of things to let the user lock the version: we could name the template |
So what if the user wants to customize the generated default |
The other question is: How do I create a zapp without a UI? Most of the zapps I create don't have a UI, so it's kind of annoying to always have one when I don't need it. There doesn't seem to be a way to omit it. |
Lars Butler [email protected] writes:
I think we talked about this: you specify an empty list for the ui key. |
Is that something we should implement, or is that how things are supposed to work currently? Because that doesn't work. A UI is always included no matter what. |
That is, it's always included in the |
I'm sorry, I was under the impression that explicitly setting the UI |
zpm new
simply creates a zapp config file (zapp.yml
). Before deploying,zpm bundle
creates web frontend artifacts (index.html. style.css, zebra.js, etc.) from templates and packs them into the.zapp
archive.The problem is, this makes is difficult to customize the web frontend. If a custom index.html file is created, it's overwritten by the rendered template created at bundle time.
Example output of
zpm bundle
:The custom index.html file is being overwritten.
I propose the following changes:
--with-ui
flag tozpm new
to generate the UI template files (index.html, zerocloud.js, style.css), in addition to thezapp.yaml
. Similar to thezapp.yaml
, the UI templates can be customized.zpm bundle
: don't automatically create web UI files for every application. There are many cases where applications would be execute remotely (command-line, etc.) and will have no need for a UI.Edit: Renamed
zebra.js
tozerocloud.js
The text was updated successfully, but these errors were encountered: