Skip to content

Commit

Permalink
feat: add support for coffeescript 2 dependency (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalavosus authored and joshwiens committed Aug 23, 2017
1 parent 69ebdf4 commit e5c24cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var coffee = require("coffee-script");
var coffee = require("coffeescript");
var loaderUtils = require("loader-utils");
module.exports = function(source) {
this.cacheable && this.cacheable();
Expand All @@ -24,8 +24,8 @@ module.exports = function(source) {
} catch (e) {
var err = "";
if (e.location == null || e.location.first_column == null || e.location.first_line == null) {
err += "Got an unexpected exception from the coffee-script compiler. The original exception was: " + e + "\n";
err += "(The coffee-script compiler should not raise *unexpected* exceptions. You can file this error as an issue of the coffee-script compiler: https://github.com/jashkenas/coffee-script/issues)\n";
err += "Got an unexpected exception from the coffeescript compiler. The original exception was: " + e + "\n";
err += "(The coffeescript compiler should not raise *unexpected* exceptions. You can file this error as an issue of the coffeescript compiler: https://github.com/jashkenas/coffee-script/issues)\n";
} else {
var codeLine = source.split("\n")[e.location.first_line];
var offendingCharacter = (e.location.first_column < codeLine.length) ? codeLine[e.location.first_column] : "";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"loader-utils": "^1.0.2"
},
"peerDependencies": {
"coffee-script": "^1.6.0"
"coffeescript": ">= 1.8.x"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit e5c24cc

Please sign in to comment.