@cmmn/tools 1.4.2 → 1.4.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/bin.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmmn/tools",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Compilation, bundling, code generator, testing.",
5
5
  "main": "dist/rollup.config.js",
6
6
  "type": "module",
@@ -65,5 +65,5 @@
65
65
  },
66
66
  "author": "",
67
67
  "license": "ISC",
68
- "gitHead": "824d290afabaa3a44ccb98322cb1758825bd9efb"
68
+ "gitHead": "8c702b1a1d2608f4eb47102a6bce712b678d6304"
69
69
  }
@@ -14,7 +14,7 @@ function visitExportNode(exportNode, sourceFile) {
14
14
  const abs = path.resolve(sourceFileDir, file);
15
15
  if (/\.(less|css|scss|sass|svg|png|html)$/.test(file)) {
16
16
  const absSource = path.join(options.outDir, path.relative(options.baseUrl, sourceFileDir));
17
- const relFile = path.relative(absSource, abs)
17
+ const relFile = path.relative(absSource, abs).replaceAll(path.sep, '/');
18
18
  return ts.updateExportDeclaration(exportNode, exportNode.decorators, exportNode.modifiers, exportNode.exportClause, ts.createStringLiteral(relFile), exportNode.typeOnly);
19
19
  }
20
20
  if (fs.existsSync(abs + '.ts')) {
@@ -34,7 +34,7 @@ function visitImportNode(importNode, sourceFile, options) {
34
34
  const abs = path.resolve(sourceFileDir, file);
35
35
  if (/\.(less|css|scss|sass|svg|png|html)$/.test(file)) {
36
36
  const absSource = path.join(options.outDir, path.relative(options.baseUrl, sourceFileDir));
37
- const relFile = path.relative(absSource, abs)
37
+ const relFile = path.relative(absSource, abs).replaceAll(path.sep, '/');
38
38
  return ts.updateImportDeclaration(importNode, importNode.decorators, importNode.modifiers, importNode.importClause, ts.createStringLiteral(relFile));
39
39
  }
40
40
  if (fs.existsSync(abs + '.ts')) {
@@ -56,7 +56,7 @@ function visitRequireNode(importNode, sourceFile) {
56
56
  const sourceFileDir = path.dirname(sourceFile.path);
57
57
  const abs = path.join(sourceFileDir, file);
58
58
  const absSource = path.join(options.outDir, path.relative(options.baseUrl, sourceFileDir));
59
- const relFile = path.relative(absSource, abs)
59
+ const relFile = path.relative(absSource, abs).replaceAll(path.sep, '/');
60
60
  return ts.updateCall(importNode, importNode.expression, undefined, [ts.createStringLiteral(relFile)]);
61
61
  }
62
62
  }