app-bundler 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bundler.js +3 -7
- package/lib/cli.js +3 -7
- package/package.json +1 -1
package/lib/bundler.js
CHANGED
|
@@ -350,11 +350,7 @@ exports.path_removeQuery = path_removeQuery;
|
|
|
350
350
|
;
|
|
351
351
|
function path_changeExtension(path, ext) {
|
|
352
352
|
let str = ext ? '.' + ext : '';
|
|
353
|
-
|
|
354
|
-
if (i === -1) {
|
|
355
|
-
return path + str;
|
|
356
|
-
}
|
|
357
|
-
return path.substring(0, i) + str;
|
|
353
|
+
return path.replace(/(\.\w+)+$/, str);
|
|
358
354
|
}
|
|
359
355
|
exports.path_changeExtension = path_changeExtension;
|
|
360
356
|
function path_toAbsolute(path, parentLocation, rootLocation) {
|
|
@@ -3016,13 +3012,13 @@ class OutputResources {
|
|
|
3016
3012
|
this.pagesInput = {};
|
|
3017
3013
|
this.items = [];
|
|
3018
3014
|
let root = resources.pop();
|
|
3015
|
+
this.rootInput = root;
|
|
3016
|
+
this.pagesInput = (0, res_1.res_groupByPageAndBundles)(resources, this.solution.opts);
|
|
3019
3017
|
let isGlob = root.isGlob;
|
|
3020
3018
|
if (isGlob !== true) {
|
|
3021
3019
|
this.rootOutput = root.toTarget(this.solution);
|
|
3022
3020
|
this.rootOutput.content = root.content;
|
|
3023
3021
|
}
|
|
3024
|
-
this.rootInput = root;
|
|
3025
|
-
this.pagesInput = (0, res_1.res_groupByPageAndBundles)(resources, this.solution.opts);
|
|
3026
3022
|
Object.keys(this.pagesInput).forEach(page => {
|
|
3027
3023
|
Object.keys(this.pagesInput[page]).forEach(bundle => {
|
|
3028
3024
|
let resources = this.pagesInput[page][bundle];
|
package/lib/cli.js
CHANGED
|
@@ -352,11 +352,7 @@ exports.path_removeQuery = path_removeQuery;
|
|
|
352
352
|
;
|
|
353
353
|
function path_changeExtension(path, ext) {
|
|
354
354
|
let str = ext ? '.' + ext : '';
|
|
355
|
-
|
|
356
|
-
if (i === -1) {
|
|
357
|
-
return path + str;
|
|
358
|
-
}
|
|
359
|
-
return path.substring(0, i) + str;
|
|
355
|
+
return path.replace(/(\.\w+)+$/, str);
|
|
360
356
|
}
|
|
361
357
|
exports.path_changeExtension = path_changeExtension;
|
|
362
358
|
function path_toAbsolute(path, parentLocation, rootLocation) {
|
|
@@ -3018,13 +3014,13 @@ class OutputResources {
|
|
|
3018
3014
|
this.pagesInput = {};
|
|
3019
3015
|
this.items = [];
|
|
3020
3016
|
let root = resources.pop();
|
|
3017
|
+
this.rootInput = root;
|
|
3018
|
+
this.pagesInput = (0, res_1.res_groupByPageAndBundles)(resources, this.solution.opts);
|
|
3021
3019
|
let isGlob = root.isGlob;
|
|
3022
3020
|
if (isGlob !== true) {
|
|
3023
3021
|
this.rootOutput = root.toTarget(this.solution);
|
|
3024
3022
|
this.rootOutput.content = root.content;
|
|
3025
3023
|
}
|
|
3026
|
-
this.rootInput = root;
|
|
3027
|
-
this.pagesInput = (0, res_1.res_groupByPageAndBundles)(resources, this.solution.opts);
|
|
3028
3024
|
Object.keys(this.pagesInput).forEach(page => {
|
|
3029
3025
|
Object.keys(this.pagesInput[page]).forEach(bundle => {
|
|
3030
3026
|
let resources = this.pagesInput[page][bundle];
|