3 ms·
Woah, this has been on my sort list of projects to build. Advantages over `source` - require is relative to script file instead of execution `pwd` - a build p
by seniorsassycat 10y ago
Woah, this has been on my sort list of projects to build.
Advantages over `source`
- require is relative to script file instead of execution `pwd`
- a build process can create a single distributable file by cat-ing the required files.
Down the road I'd like to see a `babel` for bash. I think import / export, and functions with arguments would make my time with bash more enjoyable and productive.
As with other tools, `xeon` does a little too much,
require("http://some.external.domain/awesome_script.sh")
- eropple 10y agoPrefixing is pretty trivial, though, and this does a number on portability without providing the kinds of benefits that a more full-featured solution (either of the rake/thor variety or the Chef/Puppet variety, depending on your aims) is likely to give you. It's a neat project, but I don't see a ton of use for it.
- drkraken 10y agoglag to see that you got my point, maybe for now its kind like early version, but it will make sense.
- Hurtak 10y ago> require is relative to script file instead of execution cd "$(dirname "$0")" can solve that