修改fileMatcher中的模式错误
This commit is contained in:
parent
5dc3727119
commit
8e61c363e4
@ -21,7 +21,7 @@ module.exports = function(options={}){
|
|||||||
* @param {*} texts 多条文本
|
* @param {*} texts 多条文本
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
translate:async (texts=[],from,to)=>{
|
translate:async (texts=[],from="zh",to="en")=>{
|
||||||
|
|
||||||
if(Array.isArray(texts)){
|
if(Array.isArray(texts)){
|
||||||
texts = texts.join("\n");
|
texts = texts.join("\n");
|
||||||
|
@ -11,7 +11,6 @@ const path = require('path')
|
|||||||
const fs = require('fs-extra')
|
const fs = require('fs-extra')
|
||||||
const createLogger = require("logsets")
|
const createLogger = require("logsets")
|
||||||
const { t } = require("./i18nProxy")
|
const { t } = require("./i18nProxy")
|
||||||
const { findModuleType } = require("@voerkai18n/utils")
|
|
||||||
|
|
||||||
|
|
||||||
const logger = createLogger()
|
const logger = createLogger()
|
||||||
@ -105,7 +104,7 @@ function extractTranslateTextUseRegexp(content,namespace,extractor,file,options)
|
|||||||
// 移除代码中的注释,以便正则表达式提取翻译文本时排除注释部分
|
// 移除代码中的注释,以便正则表达式提取翻译文本时排除注释部分
|
||||||
const fileExtName = file.extname.substr(1).toLowerCase() // 文件扩展名
|
const fileExtName = file.extname.substr(1).toLowerCase() // 文件扩展名
|
||||||
content = removeComments(content,fileExtName)
|
content = removeComments(content,fileExtName)
|
||||||
|
let result
|
||||||
let texts = {}
|
let texts = {}
|
||||||
while ((result = extractor.exec(content)) !== null) {
|
while ((result = extractor.exec(content)) !== null) {
|
||||||
// 这对于避免零宽度匹配的无限循环是必要的
|
// 这对于避免零宽度匹配的无限循环是必要的
|
||||||
@ -156,7 +155,7 @@ function extractTranslateTextUseFunction(content,namespace,extractor,file,option
|
|||||||
* @param {*} extractor 提取器配置={default:[],js:[],html:[],"sass,css":[],json:[],"*":[]}"}
|
* @param {*} extractor 提取器配置={default:[],js:[],html:[],"sass,css":[],json:[],"*":[]}"}
|
||||||
*/
|
*/
|
||||||
function getFileTypeExtractors(filetype,extractor){
|
function getFileTypeExtractors(filetype,extractor){
|
||||||
if(!typeof(extractor)==="object") return null
|
if(!typeof(extractor)=="object") return null
|
||||||
let matchers=[]
|
let matchers=[]
|
||||||
for(let [key,value] of Object.entries(extractor)){
|
for(let [key,value] of Object.entries(extractor)){
|
||||||
if(filetype.toLowerCase()===key.toLowerCase()){
|
if(filetype.toLowerCase()===key.toLowerCase()){
|
||||||
@ -395,7 +394,7 @@ module.exports = function(options={}){
|
|||||||
logger.log(t("激活语言\t: {}"),options.activeLanguage)
|
logger.log(t("激活语言\t: {}"),options.activeLanguage)
|
||||||
logger.log(t("名称空间\t: {}"),Object.keys(options.namespaces).join(","))
|
logger.log(t("名称空间\t: {}"),Object.keys(options.namespaces).join(","))
|
||||||
logger.log("")
|
logger.log("")
|
||||||
logger
|
|
||||||
// 保存提交提取的文本 = {}
|
// 保存提交提取的文本 = {}
|
||||||
let results = {}
|
let results = {}
|
||||||
let fileCount=0 // 文件总数
|
let fileCount=0 // 文件总数
|
||||||
|
@ -6,8 +6,7 @@ const path = require("path")
|
|||||||
const fs = require("fs-extra")
|
const fs = require("fs-extra")
|
||||||
const logger = createLogger()
|
const logger = createLogger()
|
||||||
const { i18nScope ,t } = require("./i18nProxy")
|
const { i18nScope ,t } = require("./i18nProxy")
|
||||||
const { getProjectRootFolder, getProjectSourceFolder } = require("@voerkai18n/utils");
|
const { getProjectSourceFolder } = require("@voerkai18n/utils");
|
||||||
const { translate } = require('../runtime/dist/index.cjs');
|
|
||||||
|
|
||||||
logger.use(bannerPluin)
|
logger.use(bannerPluin)
|
||||||
|
|
||||||
@ -106,7 +105,7 @@ program
|
|||||||
logger.error(t("语言包文件夹<{}>不存在",langFolder))
|
logger.error(t("语言包文件夹<{}>不存在",langFolder))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
compile = require("./compile.command")
|
let compile = require("./compile.command")
|
||||||
compile(langFolder,options)
|
compile(langFolder,options)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -121,6 +121,8 @@ var eventemitter = class EventEmitter{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const DataTypes$1 = ["String","Number","Boolean","Object","Array","Function","Null","Undefined","Symbol","Date","RegExp","Error"];
|
||||||
|
|
||||||
var scope = class i18nScope {
|
var scope = class i18nScope {
|
||||||
constructor(options={},callback){
|
constructor(options={},callback){
|
||||||
// 每个作用域都有一个唯一的id
|
// 每个作用域都有一个唯一的id
|
||||||
@ -187,7 +189,7 @@ var scope = class i18nScope {
|
|||||||
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
||||||
throw new TypeError("Formatter must be a function")
|
throw new TypeError("Formatter must be a function")
|
||||||
}
|
}
|
||||||
if(DataTypes.includes(name)){
|
if(DataTypes$1.includes(name)){
|
||||||
this.formatters[language].$types[name] = formatter;
|
this.formatters[language].$types[name] = formatter;
|
||||||
}else {
|
}else {
|
||||||
this.formatters[language][name] = formatter;
|
this.formatters[language][name] = formatter;
|
||||||
@ -325,7 +327,7 @@ let varWithPipeRegexp = /\{\s*(?<varname>\w+)?(?<formatters>(\s*\|\s*\w*(\(.*\))
|
|||||||
function hasInterpolation(str){
|
function hasInterpolation(str){
|
||||||
return str.includes("{") && str.includes("}")
|
return str.includes("{") && str.includes("}")
|
||||||
}
|
}
|
||||||
const DataTypes$1 = ["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"];
|
const DataTypes = ["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -915,7 +917,7 @@ function translate(message) {
|
|||||||
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
||||||
throw new TypeError("Formatter must be a function")
|
throw new TypeError("Formatter must be a function")
|
||||||
}
|
}
|
||||||
if(DataTypes$1.includes(name)){
|
if(DataTypes.includes(name)){
|
||||||
this.formatters[language].$types[name] = formatter;
|
this.formatters[language].$types[name] = formatter;
|
||||||
}else {
|
}else {
|
||||||
this.formatters[language][name] = formatter;
|
this.formatters[language][name] = formatter;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@voerkai18n/cli",
|
"name": "@voerkai18n/cli",
|
||||||
"version": "1.0.28",
|
"version": "1.0.29",
|
||||||
"description": "VoerkaI18n command line interactive tools",
|
"description": "VoerkaI18n command line interactive tools",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"homepage": "https://gitee.com/zhangfisher/voerka-i18n",
|
"homepage": "https://gitee.com/zhangfisher/voerka-i18n",
|
||||||
@ -50,5 +50,5 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
||||||
},
|
},
|
||||||
"lastPublish": "2022-04-15T17:44:50+08:00"
|
"lastPublish": "2022-04-16T09:12:24+08:00"
|
||||||
}
|
}
|
@ -63,7 +63,7 @@ function getTranslateProvider(options={}){
|
|||||||
* @param {*} options
|
* @param {*} options
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async function translateMessages(messages={},from,to,options={}){
|
async function translateMessages(messages={},from="zh",to="en",options={}){
|
||||||
let { mode,qps=1 } = options
|
let { mode,qps=1 } = options
|
||||||
if(messages.length===0) return;
|
if(messages.length===0) return;
|
||||||
const provider = getTranslateProvider(options)
|
const provider = getTranslateProvider(options)
|
||||||
@ -82,6 +82,7 @@ async function translateMessages(messages={},from,to,options={}){
|
|||||||
*/
|
*/
|
||||||
async function translateMultiLineMessage(messages=[],from,to,options={}){
|
async function translateMultiLineMessage(messages=[],from,to,options={}){
|
||||||
if(messages.length===0) return;
|
if(messages.length===0) return;
|
||||||
|
const qps = options.qps || 1
|
||||||
const provider = getTranslateProvider(options)
|
const provider = getTranslateProvider(options)
|
||||||
await delay(1000/qps)
|
await delay(1000/qps)
|
||||||
let result = await provider.translate(messages,from,to)
|
let result = await provider.translate(messages,from,to)
|
||||||
@ -125,7 +126,6 @@ async function translateLanguage(messages,from,to,options={}){
|
|||||||
}
|
}
|
||||||
// 对剩余的信息进行翻译
|
// 对剩余的信息进行翻译
|
||||||
if(Object.keys(lngMessages).length > 0){
|
if(Object.keys(lngMessages).length > 0){
|
||||||
requestCount++
|
|
||||||
await translateMessages(lngMessages,from,to,options)
|
await translateMessages(lngMessages,from,to,options)
|
||||||
result = deepMerge(result,lngMessages)
|
result = deepMerge(result,lngMessages)
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { useState, useEffect,useCallback } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MyComponent(){
|
* MyComponent(){
|
||||||
@ -9,7 +9,7 @@ import React, { useState, useEffect,useCallback } from 'react';
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function useVoerkaI18n(i18nScope) {
|
export function useVoerkaI18n() {
|
||||||
|
|
||||||
if(!globalThis.VoerkaI18n){
|
if(!globalThis.VoerkaI18n){
|
||||||
console.warn("useI18nContext is not provided, use default i18nContext")
|
console.warn("useI18nContext is not provided, use default i18nContext")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@voerkai18n/react",
|
"name": "@voerkai18n/react",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -15,5 +15,5 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
||||||
},
|
},
|
||||||
"lastPublish": "2022-04-15T17:53:30+08:00"
|
"lastPublish": "2022-04-16T09:12:12+08:00"
|
||||||
}
|
}
|
2
packages/runtime/dist/index.cjs
vendored
2
packages/runtime/dist/index.cjs
vendored
File diff suppressed because one or more lines are too long
2
packages/runtime/dist/index.cjs.map
vendored
2
packages/runtime/dist/index.cjs.map
vendored
File diff suppressed because one or more lines are too long
2
packages/runtime/dist/index.esm.js
vendored
2
packages/runtime/dist/index.esm.js
vendored
File diff suppressed because one or more lines are too long
2
packages/runtime/dist/index.esm.js.map
vendored
2
packages/runtime/dist/index.esm.js.map
vendored
File diff suppressed because one or more lines are too long
8
packages/runtime/dist/runtime.cjs
vendored
8
packages/runtime/dist/runtime.cjs
vendored
@ -121,6 +121,8 @@ var eventemitter = class EventEmitter{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const DataTypes$1 = ["String","Number","Boolean","Object","Array","Function","Null","Undefined","Symbol","Date","RegExp","Error"];
|
||||||
|
|
||||||
var scope = class i18nScope {
|
var scope = class i18nScope {
|
||||||
constructor(options={},callback){
|
constructor(options={},callback){
|
||||||
// 每个作用域都有一个唯一的id
|
// 每个作用域都有一个唯一的id
|
||||||
@ -187,7 +189,7 @@ var scope = class i18nScope {
|
|||||||
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
||||||
throw new TypeError("Formatter must be a function")
|
throw new TypeError("Formatter must be a function")
|
||||||
}
|
}
|
||||||
if(DataTypes.includes(name)){
|
if(DataTypes$1.includes(name)){
|
||||||
this.formatters[language].$types[name] = formatter;
|
this.formatters[language].$types[name] = formatter;
|
||||||
}else {
|
}else {
|
||||||
this.formatters[language][name] = formatter;
|
this.formatters[language][name] = formatter;
|
||||||
@ -325,7 +327,7 @@ let varWithPipeRegexp = /\{\s*(?<varname>\w+)?(?<formatters>(\s*\|\s*\w*(\(.*\))
|
|||||||
function hasInterpolation(str){
|
function hasInterpolation(str){
|
||||||
return str.includes("{") && str.includes("}")
|
return str.includes("{") && str.includes("}")
|
||||||
}
|
}
|
||||||
const DataTypes$1 = ["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"];
|
const DataTypes = ["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -915,7 +917,7 @@ function translate(message) {
|
|||||||
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
||||||
throw new TypeError("Formatter must be a function")
|
throw new TypeError("Formatter must be a function")
|
||||||
}
|
}
|
||||||
if(DataTypes$1.includes(name)){
|
if(DataTypes.includes(name)){
|
||||||
this.formatters[language].$types[name] = formatter;
|
this.formatters[language].$types[name] = formatter;
|
||||||
}else {
|
}else {
|
||||||
this.formatters[language][name] = formatter;
|
this.formatters[language][name] = formatter;
|
||||||
|
8
packages/runtime/dist/runtime.mjs
vendored
8
packages/runtime/dist/runtime.mjs
vendored
@ -119,6 +119,8 @@ var eventemitter = class EventEmitter{
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const DataTypes$1 = ["String","Number","Boolean","Object","Array","Function","Null","Undefined","Symbol","Date","RegExp","Error"];
|
||||||
|
|
||||||
var scope = class i18nScope {
|
var scope = class i18nScope {
|
||||||
constructor(options={},callback){
|
constructor(options={},callback){
|
||||||
// 每个作用域都有一个唯一的id
|
// 每个作用域都有一个唯一的id
|
||||||
@ -185,7 +187,7 @@ var scope = class i18nScope {
|
|||||||
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
||||||
throw new TypeError("Formatter must be a function")
|
throw new TypeError("Formatter must be a function")
|
||||||
}
|
}
|
||||||
if(DataTypes.includes(name)){
|
if(DataTypes$1.includes(name)){
|
||||||
this.formatters[language].$types[name] = formatter;
|
this.formatters[language].$types[name] = formatter;
|
||||||
}else {
|
}else {
|
||||||
this.formatters[language][name] = formatter;
|
this.formatters[language][name] = formatter;
|
||||||
@ -323,7 +325,7 @@ let varWithPipeRegexp = /\{\s*(?<varname>\w+)?(?<formatters>(\s*\|\s*\w*(\(.*\))
|
|||||||
function hasInterpolation(str){
|
function hasInterpolation(str){
|
||||||
return str.includes("{") && str.includes("}")
|
return str.includes("{") && str.includes("}")
|
||||||
}
|
}
|
||||||
const DataTypes$1 = ["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"];
|
const DataTypes = ["String","Number","Boolean","Object","Array","Function","Error","Symbol","RegExp","Date","Null","Undefined","Set","Map","WeakSet","WeakMap"];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -913,7 +915,7 @@ function translate(message) {
|
|||||||
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
if(!typeof(formatter)==="function" || typeof(name)!=="string"){
|
||||||
throw new TypeError("Formatter must be a function")
|
throw new TypeError("Formatter must be a function")
|
||||||
}
|
}
|
||||||
if(DataTypes$1.includes(name)){
|
if(DataTypes.includes(name)){
|
||||||
this.formatters[language].$types[name] = formatter;
|
this.formatters[language].$types[name] = formatter;
|
||||||
}else {
|
}else {
|
||||||
this.formatters[language][name] = formatter;
|
this.formatters[language][name] = formatter;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@voerkai18n/runtime",
|
"name": "@voerkai18n/runtime",
|
||||||
"version": "1.0.23",
|
"version": "1.0.24",
|
||||||
"description": "Voerkai18n Runtime",
|
"description": "Voerkai18n Runtime",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "dist/index.esm.js",
|
"module": "dist/index.esm.js",
|
||||||
@ -35,5 +35,5 @@
|
|||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
||||||
},
|
},
|
||||||
"lastPublish": "2022-04-15T17:44:08+08:00"
|
"lastPublish": "2022-04-16T09:12:02+08:00"
|
||||||
}
|
}
|
@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
const DataTypes = ["String","Number","Boolean","Object","Array","Function","Null","Undefined","Symbol","Date","RegExp","Error"];
|
||||||
|
|
||||||
module.exports = class i18nScope {
|
module.exports = class i18nScope {
|
||||||
constructor(options={},callback){
|
constructor(options={},callback){
|
||||||
// 每个作用域都有一个唯一的id
|
// 每个作用域都有一个唯一的id
|
||||||
|
@ -16,6 +16,7 @@ const fs = require("fs-extra")
|
|||||||
* debug:<true/>false,是否输出调试信息,当=true时,.test()方法返回[<true/false>,pattern] *
|
* debug:<true/>false,是否输出调试信息,当=true时,.test()方法返回[<true/false>,pattern] *
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
|
* matcher.test("<文件名称>") 返回true/false
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -35,6 +36,9 @@ const fs = require("fs-extra")
|
|||||||
|
|
||||||
// 默认排除模式
|
// 默认排除模式
|
||||||
if(defaultPatterns.length===0){
|
if(defaultPatterns.length===0){
|
||||||
|
finalPatterns.push([/__test__\/.*/,true])
|
||||||
|
finalPatterns.push([/.*\/.*\.test\.js$/,true])
|
||||||
|
finalPatterns.push([/node_modules\/.*/,true])
|
||||||
finalPatterns.push([/.*\/node_modules\/.*/,true])
|
finalPatterns.push([/.*\/node_modules\/.*/,true])
|
||||||
finalPatterns.push([/.*\/languages\/.*/,true]) // 默认排除语言文件
|
finalPatterns.push([/.*\/languages\/.*/,true]) // 默认排除语言文件
|
||||||
finalPatterns.push([/\.babelrc/,true])
|
finalPatterns.push([/\.babelrc/,true])
|
||||||
@ -46,15 +50,21 @@ const fs = require("fs-extra")
|
|||||||
|
|
||||||
inputPatterns.forEach(pattern=>{
|
inputPatterns.forEach(pattern=>{
|
||||||
if(typeof pattern === "string"){
|
if(typeof pattern === "string"){
|
||||||
pattern.replaceAll("**",".*")
|
pattern = pattern.replaceAll("**",".*")
|
||||||
pattern.replaceAll("?","[^\/]?")
|
.replaceAll("?","[^\/]?")
|
||||||
pattern.replaceAll(/(?<!\.)\*/g,"[^\/]*")
|
.replaceAll(/(?<!\.)\*/g,"[^\/]*")
|
||||||
|
try{
|
||||||
// 以!开头的表示排除
|
// 以!开头的表示排除
|
||||||
if(pattern.startsWith("!")){
|
if(pattern.startsWith("!")){
|
||||||
finalPatterns.unshift([new RegExp(pattern.substring(1),"g"),true])
|
finalPatterns.unshift([new RegExp(pattern.substring(1),"g"),true])
|
||||||
}else{
|
}else{
|
||||||
finalPatterns.push([new RegExp(pattern,"g"),false])
|
finalPatterns.push([new RegExp(pattern,"g"),false])
|
||||||
}
|
}
|
||||||
|
}catch(e){
|
||||||
|
if(debug){
|
||||||
|
console.error(`${pattern} is not a valid pattern`)
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
finalPatterns.push([pattern,false])
|
finalPatterns.push([pattern,false])
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@voerkai18n/vite",
|
"name": "@voerkai18n/vite",
|
||||||
"version": "1.0.9",
|
"version": "1.0.10",
|
||||||
"description": "VoerkaI18n plugin for Vite",
|
"description": "VoerkaI18n plugin for Vite",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -15,5 +15,5 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
"@voerkai18n/autopublish": "workspace:^1.0.2"
|
||||||
},
|
},
|
||||||
"lastPublish": "2022-04-15T17:45:00+08:00"
|
"lastPublish": "2022-04-16T09:12:34+08:00"
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
const path = require("path")
|
const path = require("path")
|
||||||
|
const fs = require("fs")
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 匹配指定路径或文件名称
|
* 匹配指定路径或文件名称
|
||||||
|
@ -67,6 +67,9 @@ function resetTestApp(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
shelljs.exec("pnpm add -g @voerkai18n/utils")
|
||||||
|
shelljs.exec("pnpm add -g @voerkai18n/runtime ")
|
||||||
|
shelljs.exec("pnpm add -g @voerkai18n/cli ")
|
||||||
shelljs.exec("pnpm update -g @voerkai18n/utils")
|
shelljs.exec("pnpm update -g @voerkai18n/utils")
|
||||||
shelljs.exec("pnpm update -g @voerkai18n/runtime ")
|
shelljs.exec("pnpm update -g @voerkai18n/runtime ")
|
||||||
shelljs.exec("pnpm update -g @voerkai18n/cli ")
|
shelljs.exec("pnpm update -g @voerkai18n/cli ")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user