Comparing version 0.0.5 to 0.0.6
@@ -61,3 +61,3 @@ #! /usr/bin/env node | ||
const rel = path_1.relative(from, x); | ||
return rel.startsWith('.') ? rel : `./${rel}`; | ||
return (rel.startsWith('.') ? rel : `./${rel}`).replace(/\\/g, '/'); | ||
}; | ||
@@ -92,3 +92,3 @@ const exts = ['.js', '.jsx', '.ts', '.tsx', '.d.ts', '.json']; | ||
const requireRegex = /(?:import|require)\(['"]([^'"]*)['"]\)/g; | ||
const importRegex = /from ['"]([^'"]*)['"]/g; | ||
const importRegex = /(?:import|from) ['"]([^'"]*)['"]/g; | ||
const replaceImportStatement = (orig, matched, outFile) => { | ||
@@ -95,0 +95,0 @@ const index = orig.indexOf(matched); |
@@ -59,3 +59,3 @@ #! /usr/bin/env node | ||
const rel = relative(from, x); | ||
return rel.startsWith('.') ? rel : `./${rel}`; | ||
return (rel.startsWith('.') ? rel : `./${rel}`).replace(/\\/g, '/'); | ||
}; | ||
@@ -90,3 +90,3 @@ const exts = ['.js', '.jsx', '.ts', '.tsx', '.d.ts', '.json']; | ||
const requireRegex = /(?:import|require)\(['"]([^'"]*)['"]\)/g; | ||
const importRegex = /from ['"]([^'"]*)['"]/g; | ||
const importRegex = /(?:import|from) ['"]([^'"]*)['"]/g; | ||
const replaceImportStatement = (orig, matched, outFile) => { | ||
@@ -93,0 +93,0 @@ const index = orig.indexOf(matched); |
{ | ||
"name": "tscpaths", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Replace absolute paths to relative paths after typescript compilation", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
@@ -82,3 +82,3 @@ #! /usr/bin/env node | ||
const rel = relative(from, x); | ||
return rel.startsWith('.') ? rel : `./${rel}`; | ||
return (rel.startsWith('.') ? rel : `./${rel}`).replace(/\\/g, '/'); | ||
}; | ||
@@ -124,3 +124,3 @@ | ||
const requireRegex = /(?:import|require)\(['"]([^'"]*)['"]\)/g; | ||
const importRegex = /from ['"]([^'"]*)['"]/g; | ||
const importRegex = /(?:import|from) ['"]([^'"]*)['"]/g; | ||
@@ -127,0 +127,0 @@ const replaceImportStatement = ( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
39389
24
0
43