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

Close generator / Cancel command #15

Open
1 of 2 tasks
ruyadorno opened this issue Dec 19, 2014 · 6 comments
Open
1 of 2 tasks

Close generator / Cancel command #15

ruyadorno opened this issue Dec 19, 2014 · 6 comments
Milestone

Comments

@ruyadorno
Copy link
Contributor

We need a close button on the interface that would bring the user back to the initial app screen, in order for this to work we'll also need a new command to actually stop the running generator on the browser side.

  • Add a cancel/stop generator command on browser - @stefanbuck
  • Add a back button to the interface in the prompts screen - @ruyadorno
@ruyadorno ruyadorno added this to the v1.0.0-beta.1 milestone Dec 19, 2014
@stefanbuck
Copy link
Member

The generator needs to bring in this feature. See yeoman/generator#728

@stefanbuck
Copy link
Member

@SBoudrias suggestion yeoman/generator#728 (comment) to run yeoman in a ChildProcess doesn't work. There are some bugs with node / atom-shell v0.20.5 itself and the ChildProcess (electron/electron#961). Unfortunately they don't know what goes wrong and I guess it's not on the high priority list. We have to find an other solution for that problem.

So from my perspective we have these options:
1. Add a cancel behaviour in the generator like I did (tried to do) yeoman/generator#728
2. Let's skip the cancel behaviour for now (maybe forever)
3. Ship node binary with the app electron/electron#961 (comment)
4. Send a fix to Atom-Shell

Let it me know if you have any other ideas or opinions to address.

@stefanbuck
Copy link
Member

Yeah, the Atom-Shell Team fixed it 😄 electron/electron#961 (comment). I will check it out tomorrow.

@stefanbuck
Copy link
Member

@ruyadorno FYI will continue with that this week.

@ruyadorno
Copy link
Contributor Author

awesome! 🎆

@stefanbuck
Copy link
Member

The generator process is not longer part of the main process of the app. The actual generator is now running in a child process so we can simple kill them and stop the npm and bower install process.

For that, I've added two new context-generator events:

  • generator:install Will be triggered once when npm or bower starts running
  • generator:cancel After emitting this event, the child process will be killed

@ruyadorno Can you please add a new state (right after generator:install is emitted) which contains the cancel button. That would be awesome. My current working branch is called child-process-wip.

If you have any questions, shout!

@stefanbuck stefanbuck modified the milestones: v1.0.0-beta.1, Curtain up Jun 14, 2015
@stefanbuck stefanbuck modified the milestones: Curtain up, v1.0.0-beta.1 Jun 27, 2015
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