Open dey-dey opened 8 years ago
or simply checking for rc file
Thanks @daedelus-j!
Doing something like this has crossed my mind. I don't use the CLI, so it hasn't been a high priority. Let me consider this.
Considering that you'd have to create a new file anyway, if you need this right now you can probably do something like:
var
pathmodify = require("pathmodify");
module.exports = function (b, opts) {
if (opts.cfgFile) {
opts = require(opts.cfgFile);
}
return pathmodify(b, opts);
};
browserify index.js -o build/bundle.js -p [ ./pathmodify --cfg-file ./.pathmodifyrc ]
(Or just embed the cfg directly in that file if you prefer.)
good point :) this is easier. mind if i add this to the docs?
Thanks @daedelus-j! That sounds good, I just want to figure out where it should go. I want to keep the README focused. This is the second time something like this has come up, so I'm thinking of creating another page of docs about integrations and / or an examples directory.
been looking for something like this that actually works for a while, so thank you!
i'm curious if you'd accept PRs for setting config from command line. something like:
that way you can configure it for tools that don't allow programmatic configuration.