i18next-scanner-typescript
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -13,3 +13,3 @@ 'use strict'; | ||
if (!options.extensions) { | ||
options.extensions = ["tsx"]; | ||
options.extensions = [".tsx"]; | ||
} | ||
@@ -24,4 +24,8 @@ | ||
content = typescript.transpileModule(content, { | ||
compilerOptions: { | ||
target: 'es2018' | ||
}, | ||
fileName: path.basename(file.path) | ||
}).outputText; | ||
parser.parseTransFromString(content); | ||
parser.parseFuncFromString(content); | ||
@@ -28,0 +32,0 @@ } |
@@ -11,3 +11,3 @@ var fs = require("fs"); | ||
if (!options.extensions) { | ||
options.extensions = ["tsx"]; | ||
options.extensions = [".tsx"]; | ||
} | ||
@@ -22,4 +22,8 @@ | ||
content = typescript.transpileModule(content, { | ||
compilerOptions: { | ||
target: 'es2018' | ||
}, | ||
fileName: path.basename(file.path) | ||
}).outputText; | ||
parser.parseTransFromString(content); | ||
parser.parseFuncFromString(content); | ||
@@ -26,0 +30,0 @@ } |
{ | ||
"name": "i18next-scanner-typescript", | ||
"description": "i18next-scanner Typescript transform", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "esnext": "dist-src/index.js", |
@@ -5,2 +5,10 @@ ## i18next-scanner-typescript | ||
## Install | ||
``` | ||
yarn add -D i18next-scanner-typescript | ||
``` | ||
## Usage | ||
@@ -12,7 +20,10 @@ | ||
module.exports = { | ||
trans: { | ||
component: "Trans" | ||
}, | ||
// your i18next-scanner config | ||
// ... | ||
transform: typescriptTransform({ extensions: ["tsx"] }) | ||
transform: typescriptTransform({ extensions: [".tsx"] }) | ||
}; | ||
``` |
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
2662
50
27