Comparing version 0.0.4 to 0.0.5
@@ -52,6 +52,8 @@ #! /usr/bin/env node | ||
const outFileToSrcFile = (x) => path_1.resolve(srcRoot, path_1.relative(outPath, x)); | ||
const aliases = Object.keys(paths).map((alias) => ({ | ||
const aliases = Object.keys(paths) | ||
.map((alias) => ({ | ||
prefix: alias.replace(/\*$/, ''), | ||
aliasPaths: paths[alias].map((p) => path_1.resolve(basePath, p.replace(/\*$/, ''))), | ||
})); | ||
})) | ||
.filter(({ prefix }) => prefix); | ||
console.log(`aliases: ${JSON.stringify(aliases, null, 2)}`); | ||
@@ -58,0 +60,0 @@ const toRelative = (from, x) => { |
@@ -50,6 +50,8 @@ #! /usr/bin/env node | ||
const outFileToSrcFile = (x) => resolve(srcRoot, relative(outPath, x)); | ||
const aliases = Object.keys(paths).map((alias) => ({ | ||
const aliases = Object.keys(paths) | ||
.map((alias) => ({ | ||
prefix: alias.replace(/\*$/, ''), | ||
aliasPaths: paths[alias].map((p) => resolve(basePath, p.replace(/\*$/, ''))), | ||
})); | ||
})) | ||
.filter(({ prefix }) => prefix); | ||
console.log(`aliases: ${JSON.stringify(aliases, null, 2)}`); | ||
@@ -56,0 +58,0 @@ const toRelative = (from, x) => { |
{ | ||
"name": "tscpaths", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Replace absolute paths to relative paths after typescript compilation", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
@@ -70,8 +70,10 @@ #! /usr/bin/env node | ||
const aliases = Object.keys(paths).map((alias) => ({ | ||
prefix: alias.replace(/\*$/, ''), | ||
aliasPaths: paths[alias as keyof typeof paths].map((p) => | ||
resolve(basePath, p.replace(/\*$/, '')) | ||
), | ||
})); | ||
const aliases = Object.keys(paths) | ||
.map((alias) => ({ | ||
prefix: alias.replace(/\*$/, ''), | ||
aliasPaths: paths[alias as keyof typeof paths].map((p) => | ||
resolve(basePath, p.replace(/\*$/, '')) | ||
), | ||
})) | ||
.filter(({ prefix }) => prefix); | ||
console.log(`aliases: ${JSON.stringify(aliases, null, 2)}`); | ||
@@ -78,0 +80,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37801
725