Comparing version 1.1.1-dev.20210905.9 to 1.1.1-dev.20210905.10
@@ -13,2 +13,3 @@ const { clear } = require('console'); | ||
const glob = require('glob'); | ||
const cwd = api.tsconfig?.compilerOptions?.rootDir || api.tsconfig.directory; | ||
const rootRegex = /^([^\/|\\])+/; | ||
@@ -20,3 +21,3 @@ const outDir = api.tsconfig?.compilerOptions?.outDir; | ||
for (const includedFromConfig of api.tsconfig.include) { | ||
const files = glob.sync(includedFromConfig, { cwd: api.tsconfig.directory }); | ||
const files = glob.sync(includedFromConfig, { cwd }); | ||
for (const file of files) { | ||
@@ -29,3 +30,3 @@ includedFiles.add(file); | ||
for (const excludedFromConfig of api.tsconfig.exclude) { | ||
const files = glob.sync(excludedFromConfig, { cwd: api.tsconfig.directory }); | ||
const files = glob.sync(excludedFromConfig, { cwd }); | ||
for (const file of files) { | ||
@@ -41,3 +42,3 @@ includedFiles.delete(file); | ||
fs.mkdirSync(outFile, { recursive: true }); | ||
} else { | ||
} else if (!file.endsWith('js') || !(file.endsWith('ts') && !api.tsconfig?.compilerOptions?.allowTs)) { | ||
fs.copyFileSync(file, outFile); | ||
@@ -47,2 +48,2 @@ } | ||
} | ||
} | ||
} |
{ | ||
"name": "tsc-hooks", | ||
"version": "1.1.1-dev.20210905.9", | ||
"version": "1.1.1-dev.20210905.10", | ||
"description": "Add tsc compiler hooks to your TypeScript project", | ||
@@ -5,0 +5,0 @@ "main": "run.js", |
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
107701
147