Enhanced, promisified ShellJS


Cross-platform shell utiliites based on ShellJS. It's the $ in Projfiles.

Require it

var $ = require('gee-shell');

Shell extends ShellJS

$.cp('-rf', 'client/css', 'public/css');

To run single command

$.run('cat test.js test2.js > test3.js');

To run multiple node and CoffeeScript scripts

  .run('cat test.js test1.js > test2.js')
  .node('test.js arg1 arg2')
  .coffee('')           # uses local coffee if it exists
coffeeRuns a CoffeeScript script$.coffee('')
insideRun operations within a directory$.inside('build', callback){})
nodeRuns a node script$.node('hello.js')
openOpens a document$.open('index.html')
outdatedTests if arg1 older than arg2$.outdated(file, againstFile)
runRuns a single command$.run('cat test.js test1.js')
runnerChain sequence of commands$'echo $PATH').node('script.js').start()
unpackUnpack (.tar.tar.gz
wgetDownloads one or more files$.wget({'index.html': '', 'index.html'})
whichFinds exe in [node_modules, path]$.which('coffee')
HOMEUser's home directoryconsole.log('Home: ', $.HOME)
isWindowsTest if running on Windows.$.isWindows && console.log('Running on Windows.')
isMacTest if running on Darwin.$.isMac && console.log('Running on Mac.')
isLinuxTest if running on Linux.$.isLinux && console.log('Running on Linux.')

The MIT License

Copyright (c) 2013 Mario Gutierrez

See the file COPYING for copying permission.