@smpx/babel-changed
Advanced tools
Comparing version 0.5.0 to 0.6.0
18
index.js
@@ -50,4 +50,4 @@ const babel = require('@babel/core'); | ||
// convert srcDir & destDir to absolute path | ||
srcDir = path.resolve(srcDir); | ||
destDir = path.resolve(destDir); | ||
srcDir = path.normalize(path.resolve(srcDir)); | ||
destDir = path.normalize(path.resolve(destDir)); | ||
@@ -66,11 +66,11 @@ const ignorePattern = []; | ||
} | ||
const srcFiles = await fastGlob(filesGlobPattern, { | ||
const srcFiles = (await fastGlob(filesGlobPattern, { | ||
cwd: srcDir, | ||
ignore: ignorePattern, | ||
absolute: true, | ||
}); | ||
const destFiles = await fastGlob(filesGlobPattern, { | ||
})).map(path.normalize); | ||
const destFiles = (await fastGlob(filesGlobPattern, { | ||
cwd: destDir, | ||
absolute: true, | ||
}); | ||
}).map(path.normalize); | ||
@@ -85,3 +85,3 @@ const filesToCompile = []; | ||
const mtimeSrc = await mtime(srcFile); | ||
const destFile = `${destDir}/${srcFile.substring(srcDir.length + 1)}`; | ||
const destFile = `${destDir}${path.sep}${srcFile.substring(srcDir.length + 1)}`; | ||
const mtimeDest = await mtime(destFile); | ||
@@ -102,3 +102,3 @@ if (mtimeDest < mtimeSrc) { | ||
const srcFile = `${srcDir}/${destFile.substring(destDir.length + 1)}`; | ||
const srcFile = `${srcDir}${path.sep}${destFile.substring(destDir.length + 1)}`; | ||
if (!srcFiles.includes(srcFile)) { | ||
@@ -193,2 +193,2 @@ filesToRemove.push(destFile); | ||
logger, | ||
} | ||
} |
{ | ||
"name": "@smpx/babel-changed", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Only compile changed files with babel", | ||
@@ -5,0 +5,0 @@ "main": "index.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
10517
198