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

Outside of project generator #1375

Closed
jakecraige opened this issue Jul 14, 2014 · 7 comments
Closed

Outside of project generator #1375

jakecraige opened this issue Jul 14, 2014 · 7 comments

Comments

@jakecraige
Copy link
Member

Currently the generators only work inside of projects. I like the idea of having an outside of project generator. The main use for this I see is that it would allow "project generators". #1374 brought this to mind

Something like that would be useful to me with my cordova project, and it seems like there could be other cases for wanting to run a generator with blueprints to create a project with some extra files.

My current setup is:

ember new my-app
npm install --save-dev ember-cli-cordova
ember cordova:init com.whatever.my-app

An outside of project generator would allow:

ember generate cordova my-app com.whatever.my-app

Needs more thought but I'm curious what you guys think.

@rwjblue
Copy link
Member

rwjblue commented Jul 14, 2014

Pretty sure that the generator/blueprint can say that it is available outside the project.

@jakecraige
Copy link
Member Author

Can it? as the generate command itself only works within a project: https://github.com/stefanpenner/ember-cli/blob/master/lib/commands/generate.js#L12

@rwjblue
Copy link
Member

rwjblue commented Jul 14, 2014

Crap, perhaps that is not true, maybe I was thinking of command's being available inside and outside of a project.

@rwjblue
Copy link
Member

rwjblue commented Jul 14, 2014

The generate command can be changed to allow this, but without a project's package.json how would you add your addon?

@jakecraige
Copy link
Member Author

@rjackson Yeah that's the part I'm not sure on. If there is a way we could detect the addon. I'd rather them not have to be installed globally.

Maybe some sort of --blueprint option to specify a remote url, and you could provide an npm package name, gh or something? (similar to rails templates)

@stefanpenner
Copy link
Contributor

👍 --blueprint <uri> ala rails templates

example ember new --blueprint http://poeticsystems.com/ember-cli-cordova.js

@stefanpenner
Copy link
Contributor

closing in-favor of --blueprint uri

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

3 participants