-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
67 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var Handlebars = require('handlebars') | ||
var TerraformError = require("../../error").TerraformError | ||
|
||
module.exports = function(fileContents, options){ | ||
|
||
return { | ||
compile: function(){ | ||
return Handlebars.compile(fileContents.toString(), options) | ||
}, | ||
|
||
parseError: function(error){ | ||
|
||
var arr = error.message.split("\n") | ||
var path_arr = arr[0].split(":") | ||
|
||
error.lineno = parseInt(error.lineno || path_arr[path_arr.length -1] || -1) | ||
error.message = arr[arr.length - 1] | ||
error.name = error.name | ||
error.source = "Handlebars" | ||
error.dest = "HTML" | ||
error.filename = error.path || options.filename | ||
error.stack = fileContents.toString() | ||
|
||
return new TerraformError(error) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
test/fixtures/javascripts/browserify/nested/way/in/here/nested.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pow = require('./../../../../Math.js').pow | ||
|
||
console.log pow(4) |
3 changes: 3 additions & 0 deletions
3
test/fixtures/javascripts/browserify/nested/way/in/here/nested.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var pow = require('./../../../../Math.js').pow; | ||
|
||
console.log(pow(4)); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters