@lingxiteam/bundle-less-theme-tools
Advanced tools
Comparing version 0.0.1-alpha.5 to 0.0.1-alpha.6
19
index.js
@@ -52,8 +52,8 @@ | ||
if(lessVarsUsedMatch.test(line)) { | ||
const usedVars = line.match(lessVarsUsedMatch); | ||
const usedVars = importPath.match(lessVarsUsedMatch); | ||
usedVars.forEach((usedVar) => { | ||
const key = usedVar.replace(/@|{|}/,''); | ||
const key = usedVar.replace(/@|{|}/g,''); | ||
const value = varsMapping[key]; | ||
if(key && value) { | ||
line = line.replace(usedVar, value) | ||
importPath = importPath.replace(usedVar, value) | ||
} | ||
@@ -86,5 +86,2 @@ }) | ||
wholePath = path.join(modulePath, importPath.replace(moduleNameMatch, '')); | ||
console.log('moduleNamemoduleName', moduleName); | ||
console.log('moduleMainEntry', moduleMainEntry); | ||
console.log('modulePath', modulePath) | ||
} else { | ||
@@ -94,4 +91,2 @@ wholePath = path.join(fileDirectory, importPath); | ||
console.log('wholePathwholePath', wholePath); | ||
// 处理过的路径,直接返回空 | ||
@@ -104,10 +99,2 @@ if(cacheImportPath[wholePath]) { | ||
return bundleTheme(wholePath) || ''; | ||
// 1. 识别是否是 ~ 开头的路径,若是,则为第三方模块(第三方模块路径怎么处理???) | ||
// 2. 识别是否是 (refenrence) 若是,则不处理 | ||
// 3. 用对象记录变量 | ||
// 4. 识别路径是否是变量,对象中查找 替换 | ||
// 5. 记录处理过的路径 | ||
// 6. 记录打包的文件内容 hash,做缓存 | ||
} | ||
@@ -114,0 +101,0 @@ return line; |
{ | ||
"name": "@lingxiteam/bundle-less-theme-tools", | ||
"version": "0.0.1-alpha.5", | ||
"version": "0.0.1-alpha.6", | ||
"description": "A tool for bundling less theme files.", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"license": "MIT", | ||
"gitHead": "d452dc2910e0d50eaffd5227f95d7d369b5f3bfc" | ||
"gitHead": "bd6d85283a0f7f16737fd76ebde37074799068c9" | ||
} |
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
5762
120