Closed majgis closed 9 years ago
I may be wrong but I think this can be achieved by passing the option { fromSourceFileDir: true }
when calling the make*Transform
function. By default the search for package config begins from the directory the process is running in, not the directory the source file is in (see loadTransformConfig
in src/loadConfig.coffee
). Passing in the fromSourceFileDir
should change that behavior.
@majgis Does fromSourceFileDir fix this for you? I should have defaulted this flag to true, but I didn't want to break existing libraries. :/
Thanks fir the responses. Yes, it does fix it. Sorry, I didn't read the docs more carefully. I agree it should be the default, maybe if you have other breaking changes in the future and increment major version, you could flip it then.
Yeah. I just made a change I'm less than happy with in 1.3.3 which I may turn around and break in a few days, so if that happens I will do. :)
I want to use the transform I create with browserify-transform-tools to apply to reusable packages, but configuration can't be set for each package the same way browserify transforms are.
Browserify transforms are defined at the package level, but browserify-transform-tools reads configuration only from the top level package.
For example, I want to create a transform called somethingify. I then want to create a reusable package called reuseMe that uses somethingify and sets it's own configuration.
To be consistent with browserify behavior, transform options should not apply to child packages. Each package should be responsible for describing the transforms it uses and the configurations for those transforms.