app-bundler 0.2.2 → 0.2.3

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 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
- let i = path.indexOf('.');
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) {
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
- let i = path.indexOf('.');
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-bundler",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "",
5
5
  "main": "lib/bundler.js",
6
6
  "bin": {