Open jordwalke opened 8 years ago
@yunxing - do you have any suggestions about the best way to make a command like that?
How about this instead:
scripts
, we create a new section in the package.json
called run
. These scripts are always executed such that dependencyEnv
is first sourced.re
which is the entry point to all of the build/install tooling. You can then execute re run yourScriptName
. Alternatively, you could execute re exec your command here
to execute the literal command your command here
.@jordwalke Sorry just saw this.
An alternative is create a VirtualEnv-like program which creates a "env session" on user's current shell session.
Does that let you undo the changes to variables?
Yes. We can stack the previous variables and have a separate program to pop them out when we are done with the environment.
Right now, in your
npm
"run scripts" orMakefile
s, you must do:In order to source the variables for executing
some-command
.I'd rather the command be more like the
unix
time
command.Which would spin up a new shell, source the real
dependencyEnv
which sets the env variables, and runs the command that was specified after.