Skip to content

Commit

Permalink
Update nesh executable to use node rather than coffee to remove the d…
Browse files Browse the repository at this point in the history
…ependency on coffee-script
  • Loading branch information
danielgtaylor committed Apr 3, 2013
1 parent 1db2a14 commit 7b1f260
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -174,7 +174,7 @@ cake build
You can run the `nesh` command from your local checkout:

```bash
./bin/nesh.coffee
./bin/nesh.js
```

It is also possible to use `npm` to link your local checkout globally (note: this may require `sudo`):
Expand Down
3 changes: 3 additions & 0 deletions bin/nesh.js
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require('../lib/command');
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://github.com/danielgtaylor/nesh",
"main": "lib/nesh.js",
"bin": {
"nesh": "./bin/nesh.coffee"
"nesh": "./bin/nesh.js"
},
"scripts": {
"pretest": "cake build",
Expand Down
15 changes: 10 additions & 5 deletions bin/nesh.coffee → src/command.coffee 100755 → 100644
@@ -1,6 +1,8 @@
#!/usr/bin/env coffee

nesh = require '../lib/nesh'
###
The nesh command, which parses options and then drops the user
into an interactive session.
###
nesh = require './nesh'

optimist = require('optimist')
.usage('$0 [options]')
Expand Down Expand Up @@ -49,5 +51,8 @@ opts = {}
opts.prompt = argv.prompt if argv.prompt?
opts.welcome = argv.welcome if argv.welcome?

nesh.start opts, (err) ->
console.error err if err
nesh.loadPlugin require('./plugins/builtins'), (err) ->
return console.log err if err

nesh.start opts, (err) ->
console.error err if err

0 comments on commit 7b1f260

Please sign in to comment.