不要怂,就是干,撸起袖子干!

Commit f582100a by Rob Skillington

Fix for CoffeeScript prior to breaking change in 1.7.x for compiler registration

1 parent a9dbf12f
Showing with 8 additions and 2 deletions
...@@ -52,10 +52,16 @@ module.exports = (function() { ...@@ -52,10 +52,16 @@ module.exports = (function() {
get: function() { get: function() {
if (this.path.match(/\.coffee$/)) { if (this.path.match(/\.coffee$/)) {
try { try {
// 1.7.x compiler registration
require('coffee-script/register') require('coffee-script/register')
} catch(e) { } catch(e) {
console.log("You have to add \"coffee-script\" to your package.json.") try {
process.exit(1) // Prior to 1.7.x compiler registration
require('coffee-script')
} catch (e) {
console.log("You have to add \"coffee-script\" to your package.json.")
process.exit(1)
}
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!