0.1.0-pre • Published 10 years ago

gee-shell v0.1.0-pre

Weekly downloads
1
License
-
Repository
-
Last release
10 years ago

projmate-shell

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

Examples

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

$.runner
  .run('cat test.js test1.js > test2.js')
  .node('test.js arg1 arg2')
  .coffee('other.coffee')           # uses local coffee if it exists
  .start(cb);

Methods

NameDescriptionExample
coffeeRuns a CoffeeScript script$.coffee('hello.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$.runner.run('echo $PATH').node('script.js').start()
unpackUnpack (.tar.tar.gz.zip) archives$.unpack('archive.tgz', 'components', callback)
wgetDownloads one or more files$.wget({'index.html': 'http://github.com', 'index.html'})
whichFinds exe in node_modules, path$.which('coffee')

Attributes

NameDescriptionExample
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.')

License

The MIT License

Copyright (c) 2013 Mario Gutierrez mario@mgutz.com

See the file COPYING for copying permission.