-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
'end' emitted multiple times on overwriting files. #302
Comments
Okay, definitely has something to do with overwriting files. I had a duplicate copy command somewhere, which triggered one extra 'end' event somehow. Is this expected behavior? @addyosmani, @mklabs, @sindresorhus ? |
installDependencies will basically handle npm / bower install of dependencies for you. For the generator you're working on, did you fork an existing generator or have you started from scratch? A little more context about what you've done so far would help us understand if this is a bug. |
I have started from the generator-generator and rolled my own from there. In the templates folder, I've added a folder named sass. In that folder resides a file named style.scss. See this gist: https://gist.github.com/thomasmattheussen/5805708 So, I copy everything from the sass directory (including the style.scss), and then I try to template that style.scss (which overwrites the style.scss file that already got copied through the directory method in the previous line) That somehow seems to trigger another 'end' event, and thus fires the installDependencies multiple times. Same behavior occurs when you try this:
Am I making sense here? |
@thomasmattheussen you should try yeoman git master branch and see if it solves your problem |
Hmmm... No dice, same problem occurs on both master and v0.11.1 |
So @thomasmattheussen , maybe you've put badly the |
I've updated my gist: https://gist.github.com/thomasmattheussen/5805708 to show my full index.js I could be wrong, but I don't see it.. :/ |
0.12.1 is the latest. Can you reproduce the issue with it? |
Yep. Same problem. To reproduce, create a new generator with
(To be clear on testing with different versions: I |
Have the same issue with 1.0.0-beta.7. Had the following in my generator and was getting multiple "end" events emitted.
|
Fixed in #402 |
I'm trying to create my own generator, but I guess I'm missing something.
gets executed multiple times, and I can not for the live of me figure out why that is.
This message is printed several times during the generation:
"I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself."
I've narrowed down one of the extraneous firing of 'end' to these lines:
If i comment out one of those lines, it works. Doesn't seem to matter which one. Does this have anything to do with the fact that the style.scss file gets overwritten? Because it's already residing in the sass folder.
Anyone care to elaborate?
The text was updated successfully, but these errors were encountered: