Preparing for Yeoman 1.0 & # 8594; this.installDependencies no longer works

I am working on porting JHipster to Yeoman 0.20.1 to prepare for Yeoman 1.0.

At the end of our process, we usually:

  • Run npm install

    andbower install

  • Use a callback function to do some Grunt or Gulp.js tasks, usually grunt wiredep

It always worked, and here is the current code that starts the installation process.

Since I migrated to Yeoman 0.20.1, we still have:

  • The function installDependencies

    is called
  • It even displays a message I'm all done. Running npm install & bower install for you to install the required dependencies. If this fails, try running the command yourself.

But the installation doesn't actually take place! NPM and Bower don't install anything, and our Grunt task is not called. Please note that if I call them manually they will work correctly.

If you try to debug this and it looks like this method is not being called.

Can anyone help me with this issue?

+3


source to share


1 answer


It seems to me that the run loop can be executed after the event is fired end

. installDependencies

use scheduling methods with priority install

. If the run loop is complete, they will not run.

You can just call installDependencies

anytime and not worry about the event callback end

. If you want to mimic the behavior you currently have, call installDependencies

inside a method named end

.




As a side note, in the API installDependencies you no longer need to manually specify skipInstall

(this is now automatic).

+1


source







All Articles