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

Support generating an empty extension #54

Closed
JonasHelming opened this issue Apr 6, 2020 · 6 comments
Closed

Support generating an empty extension #54

JonasHelming opened this issue Apr 6, 2020 · 6 comments

Comments

@JonasHelming
Copy link
Contributor

This would be useful to set up a new contribution, which is not covered by an existing template. The option to not create an example is actually already existing ("example:boolean"). However, the option is not correctly processed by most existing templates. As a consequence, if you set "example" to false, the templates will create the frontend module, but not the contribution, which leads to not compilable code. I suggest to remove the option "example" and provide a dedcaited empty template. I will push a PR.

JonasHelming added a commit to JonasHelming/generator-theia-extension that referenced this issue Apr 6, 2020
removed option "example", added dedicated empty template

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
@vince-fugnitto
Copy link
Member

vince-fugnitto commented Apr 6, 2020

@JonasHelming I could not identify what example actually does.
I attempted the following:

yo theia-extension --example=false

and selected the hello world option and it ultimately lead to code which successfully compiled and ran. Am I missing something?

@JonasHelming
Copy link
Contributor Author

The hello world option handles this case correctly, try the "widget" :-)

@vince-fugnitto
Copy link
Member

The hello world option handles this case correctly, try the "widget" :-)

I tried using widget as an option and it still seemed to work?
I suspect that example is just not used as an option.

@JonasHelming
Copy link
Contributor Author

You are right, I retested that. So you just discovered even another bug. in the "configuring" of index.ts, the "example" input parameter is not added to parameters. Therefore, in the current state, the parameter is completly ignored. If it would not be ignored, it would lead to the issue described above. So this fix addresses both issues basically by removing the example option altogether (which did not even work) and replacing this with a dedicated template.

@JonasHelming
Copy link
Contributor Author

PR: #55

vince-fugnitto pushed a commit that referenced this issue Apr 29, 2020
removed option "example", added dedicated empty template

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
@vince-fugnitto
Copy link
Member

Closed thanks to #55

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