This adds a bundle/add_process_shim that adds a process object similar to the one steal's npm package does. This shim is added by default, unless noProcessShim is true (similar to noGlobalShim).
Furthermore, add_process_shim will use options.env as the env.NODE_ENV. This defaults to "development".
There are tests for both the default development and env: "production" cases.
problems / considerations:
This duplicates the global identifying code. I'm not sure how we could avoid this.
The steal process shim's cwd defaults to steal.baseUrl. I defaulted it to "".
Steal 2.0 will need to merge and release this.
There's no documentation around noProcessShim and env.
For #1024
This adds a
bundle/add_process_shim
that adds aprocess
object similar to the one steal'snpm
package does. This shim is added by default, unlessnoProcessShim
istrue
(similar tonoGlobalShim
).Furthermore,
add_process_shim
will useoptions.env
as theenv.NODE_ENV
. This defaults to"development"
.There are tests for both the default development and
env: "production"
cases.problems / considerations:
global
identifying code. I'm not sure how we could avoid this.process
shim'scwd
defaults tosteal.baseUrl
. I defaulted it to""
.noProcessShim
andenv
.noGlobalShim
.