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

Allow specifying system templates in ui section #141

Open
mgeisler opened this issue Jun 26, 2014 · 3 comments
Open

Allow specifying system templates in ui section #141

mgeisler opened this issue Jun 26, 2014 · 3 comments

Comments

@mgeisler
Copy link
Contributor

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 my zapp.yaml file:

ui:
- "index.html"

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:

ui:
- "index.html"
- "<zerocloud.js>"

This would mean that leaving out the ui section is equivalent to:

ui:
- "<index.html>"
- "<style.js>"
- "<zerocloud.js>"
@larsbutler
Copy link
Member

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.

@larsbutler
Copy link
Member

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.

@mgeisler
Copy link
Contributor Author

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.

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

No branches or pull requests

2 participants