0.1.6 • Published 7 years ago

@nrser/jash v0.1.6

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

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.

  1. have a path that can be set via a JASH_PATH env var that is searched.

  2. jash takes an arg like d/m.f which would mean the function f in the first d/m.js file found going through the path (unless there's a d/m.es6.js found, see below).

  3. 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 that jash 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 of m.js and check against that first to see if we need to re-transpile.