-
transfigurify::env
-
The env variable which is used by transfigurify to determine which transforms config in the
package.json
to use in order to apply transforms.You need to set this or provide it via the
TRANSFIGURIFY_ENV
environment variable.// setting from javascript transfigurify.env = 'test';
# setting from command line TRANSFIGURIFY_ENV=test browserify -t transfigurify ...
-
transfigurify(file) → {TransformStream}
-
browserify transform which applies a set of browserify transforms that are configured inside
package.json
. Multiple sets can be configured and a matching one selected depending on theTRANSFIGURIFY_ENV
environment variable.This variable can also be set directly via
transfigurify.env='x'
.If no matching configuration is found or the environment variable wasn't set a through stream is returned which means that the file will not be transformed by transfigurify.
Parameters:
Name Type Description file
string file whose content is to be transformed
Returns:
transform that is composed of the transforms that were configured for the environment (if any)
- Type
- TransformStream