Open mgeisler opened 10 years ago
This would mean that leaving out the ui section is equivalent to:
ui: - "<index.html>" - "<style.js>" - "<zerocloud.js>"
Leaving out the ui
section is equivalent to including all of the system defaults? If I'm reading that right, that doesn't make any sense.
I think the concept of system templates is overly complicated and unnecessary. I would much rather just have defaults which can be generated once and customized. This way we don't need to invent the concept of system templates, nor do we need to invent an "include" syntax.
I updated my opinion on this, see the comment in issue #109 where I suggest:
I think my suggestion in #141 would help: zpm new could generate a ui section with
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.
Inspired by the discussion in #109 I think it would be nice if I could pull in a system template in my
ui
section.Assume I have the following
ui
section in myzapp.yaml
file:The generated zapp wont have a
zerocloud.js
file.I have to manually extract the file from a zapp and include it in my
ui
section. This also implies that I have to version control this auto-generated file — something which you normally try to avoid. If the ZeroCloud library changes in the future (perhaps with a bugfix), then I have to notice this and extract it again from a dummy zapp.The syntax for this could be similar to includes in CPP:
This would mean that leaving out the
ui
section is equivalent to: