@itrocks/template 0.1.7 → 0.2.0

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/cjs/template.js CHANGED
@@ -265,7 +265,9 @@ class Template {
265
265
  if (link[0] === '/')
266
266
  return link;
267
267
  const result = (0, node_path_1.normalize)(this.filePath + node_path_2.sep + link).substring(app_dir_1.appDir.length);
268
- return (node_path_2.sep === '/') ? result : result.replaceAll(node_path_2.sep, '/');
268
+ return (((node_path_2.sep === '/') ? result : result.replaceAll(node_path_2.sep, '/')))
269
+ .replace(/^\/node_modules\/@itrocks\//, '/@itrocks/')
270
+ .replace(/^\/node_modules\//, '/lib/');
269
271
  }
270
272
  async parseBuffer(buffer) {
271
273
  this.prefixes = this.parsers.map(([prefix]) => prefix).join('');
package/esm/template.js CHANGED
@@ -260,7 +260,9 @@ export class Template {
260
260
  if (link[0] === '/')
261
261
  return link;
262
262
  const result = normalize(this.filePath + sep + link).substring(appDir.length);
263
- return (sep === '/') ? result : result.replaceAll(sep, '/');
263
+ return (((sep === '/') ? result : result.replaceAll(sep, '/')))
264
+ .replace(/^\/node_modules\/@itrocks\//, '/@itrocks/')
265
+ .replace(/^\/node_modules\//, '/lib/');
264
266
  }
265
267
  async parseBuffer(buffer) {
266
268
  this.prefixes = this.parsers.map(([prefix]) => prefix).join('');
package/package.json CHANGED
@@ -69,5 +69,5 @@
69
69
  "test": "test/test"
70
70
  },
71
71
  "types": "./esm/template.d.ts",
72
- "version": "0.1.7"
72
+ "version": "0.2.0"
73
73
  }