fis3-parser-react-i18n
Advanced tools
Comparing version 0.0.0-alpha.12 to 0.0.0-alpha.13
@@ -9,2 +9,3 @@ var parse = require('@babel/parser').parse; | ||
var p = require('path'); | ||
var ignore = require('ignore'); | ||
function hash(str) { | ||
@@ -25,3 +26,7 @@ var md5 = crypto.createHash('md5'); | ||
} | ||
if (ignoreList.find(function (n) { return filePath.includes(n); })) { | ||
var relativePath = p.relative(process.cwd(), filePath); | ||
var includes = ignore().add(options.includes); | ||
var included = includes.ignores(relativePath); | ||
var ig = ignore().add(ignoreList); | ||
if (ig.ignores(relativePath) && !included) { | ||
return content; | ||
@@ -167,3 +172,4 @@ } | ||
}, content); | ||
console.log("i18n: ".concat(relativePath)); | ||
return codeRes.code; | ||
}; |
{ | ||
"name": "fis3-parser-react-i18n", | ||
"version": "0.0.0-alpha.12", | ||
"version": "0.0.0-alpha.13", | ||
"description": "fis3处理react国际化插件", | ||
@@ -19,3 +19,4 @@ "main": "index.js", | ||
"@babel/traverse": "^7.18.10", | ||
"@babel/types": "^7.18.10" | ||
"@babel/types": "^7.18.10", | ||
"ignore": "^5.2.0" | ||
}, | ||
@@ -27,2 +28,2 @@ "devDependencies": { | ||
} | ||
} | ||
} |
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
7582
172
6
+ Addedignore@^5.2.0
+ Addedignore@5.3.2(transitive)