Skip to content

Commit 3f92810

Browse files
committed
Merge pull request notablemind#16 from terraqout/master
Coffee script bare and no-prompt option
2 parents 7c773e1 + 6d7a76f commit 3f92810

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ext/coffee.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ export default function (ctx, args, done) {
55
block: {
66
coffee: {
77
transform(ctx, args, code, out, done) {
8-
const opts = { }
8+
const opts = { bare: args.indexOf('bare') !== -1 }
99
try {
1010
code = coffee.compile(code, opts)
1111
} catch (err) {
1212
return done(err)
1313
}
14-
console.log('coffee->\n', code)
14+
if (args.indexOf('no-prompt') === -1) {
15+
console.log('coffee->\n', code)
16+
} else {
17+
console.log(code)
18+
}
1519
done(null, code)
1620
}
1721
},

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
"dependencies": {
2727
"async": "^0.9.0",
2828
"babel": "^5.1.11",
29-
"coffee-script": "^1.9.2",
3029
"bencode": "^0.7.0",
30+
"coffee-script": "^1.9.2",
3131
"contextify": "^0.1.13",
32+
"mkdirp": "^0.5.1",
3233
"superagent": "^1.2.0",
3334
"zmq": "^2.11.0"
3435
},

0 commit comments

Comments
 (0)