@nrser/jash
v0.1.6
Published
do javascript from bash.
Downloads
9
Readme
jash
jash
just lets you call javascipt functions from the bash prompt.
thoughts on how it should work... i left it half-way through whatever and it's kinda a mess and 'cause of that but i wanted to record the general idea.
have a
path
that can be set via aJASH_PATH
env var that is searched.jash
takes an arg liked/m.f
which would mean the functionf
in the firstd/m.js
file found going through the path (unless there's ad/m.es6.js
found, see below).since we want to use es6,
jash
is going be kind enough to transpile it for us. in fact, it will compile everything in the directory so that we can include other files (i'm not going to deal with trying to chase the includes now but it should be possible since we parse the file).to make it easy, we're going to name these files
*.es6.js
so thatjash
knows to transpile them into their*.js
counterparts.however, since it seems to take a bit for babel to boot up and do it's thing (which isn't surprising) we're going to leave a hash of the source file
m.es6.js
as a comment at the top ofm.js
and check against that first to see if we need to re-transpile.