@itrocks/template 0.0.27 → 0.0.28

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
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.Template = exports.frontScripts = void 0;
7
- const rename_1 = __importDefault(require("@itrocks/rename"));
8
- const app_dir_1 = __importDefault(require("@itrocks/app-dir"));
4
+ const app_dir_1 = require("@itrocks/app-dir");
5
+ const rename_1 = require("@itrocks/rename");
9
6
  const sorted_array_1 = require("@itrocks/sorted-array");
10
7
  const promises_1 = require("node:fs/promises");
11
8
  const node_path_1 = require("node:path");
@@ -403,7 +400,7 @@ class Template {
403
400
  }
404
401
  }
405
402
  if (data[variable] === undefined) {
406
- data = new rename_1.default(data);
403
+ data = new rename_1.Str(data);
407
404
  }
408
405
  let value = data[variable];
409
406
  return (((typeof value)[0] === 'f') && ((value + '')[0] !== 'c'))
@@ -659,7 +656,7 @@ class Template {
659
656
  }
660
657
  if (inLinkHRef && attributeValue.endsWith('.css')) {
661
658
  let frontStyle = (0, node_path_1.normalize)(this.filePath + node_path_1.sep + this.source.substring(this.start, this.index))
662
- .substring(app_dir_1.default.length);
659
+ .substring(app_dir_1.appDir.length);
663
660
  if (node_path_1.sep !== '/') {
664
661
  frontStyle = frontStyle.replaceAll(node_path_1.sep, '/');
665
662
  }
@@ -668,7 +665,7 @@ class Template {
668
665
  }
669
666
  if (inScriptSrc && attributeValue.endsWith('.js')) {
670
667
  let frontScript = (0, node_path_1.normalize)(this.filePath + node_path_1.sep + this.source.substring(this.start, this.index))
671
- .substring(app_dir_1.default.length);
668
+ .substring(app_dir_1.appDir.length);
672
669
  if (node_path_1.sep !== '/') {
673
670
  frontScript = frontScript.replaceAll(node_path_1.sep, '/');
674
671
  }
package/esm/template.js CHANGED
@@ -1,5 +1,5 @@
1
- import Str from '@itrocks/rename';
2
- import appDir from '@itrocks/app-dir';
1
+ import { appDir } from '@itrocks/app-dir';
2
+ import { Str } from '@itrocks/rename';
3
3
  import { SortedArray } from '@itrocks/sorted-array';
4
4
  import { readFile } from 'node:fs/promises';
5
5
  import { normalize, sep } from 'node:path';
package/package.json CHANGED
@@ -67,5 +67,5 @@
67
67
  "test": "jest"
68
68
  },
69
69
  "types": "./esm/template.d.ts",
70
- "version": "0.0.27"
70
+ "version": "0.0.28"
71
71
  }