Closed JAForbes closed 7 years ago
I've added -I, --import
and made require()
(which it uses) to look for modules in $PWD/node_modules
. This should make ramda-cli work as a dependency of a project and in npm scripts so that other modules can be used with it.
$ npm run test
> testdir@1.0.0 test /testdir
> date +%s | ramda -r --import m=moment "m.unix"
"2017-03-10T23:34:00.000Z"
Also, while at it, I made Promise values unwrap. Might be of use when using async modules with ramda-cli.
This library is incredible. I'm wondering if its possible to configure included libraries on a per project basis. I'd like to include Sanctuary but I need these commands to run in a CI environment. I could drop stuff into the HOME directory but it'd be a lot nicer for ramda cli to piggy back of modules that already exist in a project.
Would you be open to a PR that enables piggy backing on
./node_modules/.bin
in the cwd? I'd be fine if it was guarded by a flag. Maybe something like:I'd like the functions to be injected as globals but I'd be ok to namespace them if that's better, something like?
What do you think?