Skip to content

Commit 99c14b8

Browse files
committed
[Issue #31] - Remap automatically converts relative paths...
1 parent 6c9be82 commit 99c14b8

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"ignoreViews": [
1313
"styleguide.html"
1414
],
15+
"url": "http://localhost:3000/",
1516

1617
"precmd": "",
1718
"postcmd": ""

lib/chainlinks/importer.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ let Importer = function() {
1010
this.dirJS = "";
1111
this.layoutFile = "";
1212
this.ignoreViews = [];
13+
this.url = false;
1314

1415
this.typeCSS = "";
1516
this.typeJS = "";
@@ -44,8 +45,15 @@ let Importer = function() {
4445
* @return Promise Returns a promise, which returns the DOM content on accept
4546
*/
4647
this.loadFile = function(file) {
48+
49+
let options = {};
50+
51+
if (this.url) {
52+
options = {url: this.url};
53+
}
54+
4755
// Load the file
48-
return JSDOM.fromFile(this.fixFilename(file));
56+
return JSDOM.fromFile(this.fixFilename(file), options);
4957
};
5058

5159
/**

0 commit comments

Comments
 (0)