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

Make NodeTask work a bit more like a regular exec call #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stormbeta
Copy link

  • Add node_modules/.bin directory to NodeTask PATH - this ensures that node scripts can call other node scripts properly. With plain grunt / gulp this is rarely an issue, but it's a problem when other tools like cordova and ionic expect to be able to call grunt/gulp themselves.
  • Add executable field to NodeTask for specifying node scripts directly rather than having to manually depend on the npm install and then constructing the file object from node_modules/.bin/SCRIPT, and makes it look more like a normal Exec task.

Also add 'executable' syntax sugar for NodeTask
@srs
Copy link
Owner

srs commented Oct 2, 2015

Thanks. Any reason that the NodeTask should depend on NpmInstallTask when setting the executable?

@stormbeta
Copy link
Author

The NpmInstallTask dependency is for executables installed via devDependencies, which is common for stuff like cordova/ionic/gulp/etc.

This allows calling ExecSpec methods directly from the execOverrides
closure, just like when using exec { } from Gradle normally.
@Jaygiri
Copy link

Jaygiri commented Jun 27, 2016

+1

Is it possible to expose nodeBinDirPath? I want to copy the downloaded node version to different directory. Without the path it would be hard to figure out the full directory name. Thanks.

@srs
Copy link
Owner

srs commented Jan 13, 2017

This pull request is out of date. Need to fix the conflicts.

@vrudikov
Copy link

Hi, all! Is there any updates for this ticket?

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

Successfully merging this pull request may close these issues.

4 participants