File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog - html-to-app
22
3+ ## [ 0.2.2] - 2018-03-30
4+
5+ ### Fixes
6+
7+ - [ Issue #30 ] - Remaps with same tag seem to interfere
8+ - [ Issue #29 ] - Build -f throws exception if app is open in another window
9+ - [ Issue #28 ] - App isn't merged without -f
10+
311## [ 0.2.1] - 2018-03-29
412
513### Additions
Original file line number Diff line number Diff line change @@ -42,8 +42,14 @@ let Builder = function() {
4242
4343 // Remove the bin forlder if force build
4444 if ( payload . build . force ) {
45- shell . execSync ( "rm -rf " + buildPath ) ;
46- shouldBuild = true ;
45+ try {
46+ shell . execSync ( "rm -rf " + buildPath ) ;
47+ shouldBuild = true ;
48+
49+ }
50+ catch ( ex ) {
51+ reject ( "Cannot remove build directory. Please make sure it is not open in another window." ) ;
52+ }
4753 }
4854
4955 // Create build directory if necessary
@@ -82,7 +88,14 @@ let Builder = function() {
8288
8389 }
8490 else {
85- accept ( payload ) ;
91+
92+ // Merge build
93+ if ( this . _mergeCmd && this . binCmd ( this . _mergeCmd ) ) {
94+ accept ( payload ) ;
95+ }
96+ else {
97+ reject ( "Could not merge" ) ;
98+ }
8699 }
87100
88101 } ) ;
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ let Converter = function() {
4242 dom . window . document . querySelectorAll ( remap . tag ) . forEach ( ( element ) => {
4343
4444 let href = "" ;
45+ let elementType = element . nodeName . toLowerCase ( ) ;
4546
46- switch ( remap . tag ) {
47+ switch ( elementType ) {
4748 case "a" :
4849 case "link" :
4950 href = element . href ;
@@ -80,7 +81,7 @@ let Converter = function() {
8081 element . integrity = remap . integrity ;
8182 }
8283
83- switch ( remap . tag ) {
84+ switch ( elementType ) {
8485 case "a" :
8586 case "link" :
8687 element . href = href ;
Original file line number Diff line number Diff line change 11{
22 "name" : " html-to-app" ,
3- "version" : " 0.2.1 " ,
3+ "version" : " 0.2.2 " ,
44 "description" : " Convert HTML flat file sites to Apps" ,
55 "main" : " lib/index.js" ,
66 "bin" : {
You can’t perform that action at this time.
0 commit comments