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

Add isForced argument, which forces respawn even without node flags #11

Closed
wants to merge 1 commit into from

Conversation

sttk
Copy link
Contributor

@sttk sttk commented Feb 22, 2018

This pr adds isForced argument to this module. isForced is to force respawn even if forcedFlags is empty or is not specified.

I will modify Liftoff to respawn itself when cwd or configPath is specified explicitly, in order to add node_modules in cwd to environment variable NODE_PATH. (process.env.NODE_PATH is not allowed to change in a program).

By this, for example, gulp can load modules in node_modules in both gulpfile directory and cwd. (And this will solve the issues gulpjs/gulp#2126 and gulpjs/liftoff#55.)

@phated
Copy link
Member

phated commented Feb 23, 2018

@sttk I didn't get a chance to respond in full to your suggestion but I don't like the idea of introducing this sort of magic into the CLI. If we do this, we're basically warping the way node's require works. Maybe we just need to better document this edge case and suggest the consumer add NODE_PATH before their command?

@sttk
Copy link
Contributor Author

sttk commented Feb 24, 2018

@phated You're right. This way is certainly odd, and I agree to placing that suggestion on document.

I'll close this pr.

@sttk sttk closed this Feb 24, 2018
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.

2 participants