Skip to content

Commit 3c630f4

Browse files
authored
Merge pull request #33 from StatelessSoftware/v0.3.0
V0.3.0
2 parents 2ea91df + 2dac499 commit 3c630f4

5 files changed

Lines changed: 16 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog - html-to-app
22

3+
## [0.3.0] - 2018-03-30
4+
5+
### Additions
6+
37
## [0.2.2] - 2018-03-30
48

59
### Fixes

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The configuration consists of 4 top-level build-chain objects: importer, convert
3939

4040
## Importer
4141

42+
- **url** - URL to convert relative paths to during remap. Will default to an absolute `file:///` path.
4243
- **dirHTML** - The location of the HTML flat-files, relative to the current working directory.
4344
- **dirImages** - The location of asset images in the flat-file site.
4445
- **dirCSS** - The location of css (css, less, sass, etc) files to copy

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
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "html-to-app",
3-
"version": "0.2.2",
3+
"version": "0.3.0",
44
"description": "Convert HTML flat file sites to Apps",
55
"main": "lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)