structor-tool-talentui
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -35,23 +35,25 @@ 'use strict'; | ||
} | ||
//改buffer | ||
var bufferList = buffer.split('{'); | ||
var newBuf=''; | ||
//在合适的位置加入 | ||
bufferList[bufferList.length-1] = componentNames + bufferList[bufferList.length-1]; | ||
//恢复buffer | ||
for(var i = 0; i < bufferList.length; i++) { | ||
if(i == bufferList.length-1){ | ||
newBuf += bufferList[i]; | ||
if(buffer.split(importCentens).length < 2){ | ||
//如果已经加入了语句,就不会修改并写入了。 | ||
//改buffer | ||
var bufferList = buffer.split('{'); | ||
var newBuf=''; | ||
//在合适的位置加入 | ||
bufferList[bufferList.length-1] = componentNames + bufferList[bufferList.length-1]; | ||
//恢复buffer | ||
for(var i = 0; i < bufferList.length; i++) { | ||
if(i == bufferList.length-1){ | ||
newBuf += bufferList[i]; | ||
} | ||
else{ | ||
newBuf += bufferList[i]+'{'; | ||
} | ||
} | ||
else{ | ||
newBuf += bufferList[i]+'{'; | ||
} | ||
//写入源文件 | ||
writeFileAtomic(totalUrl, importCentens+newBuf, {chown:{uid:100,gid:50}}, function (err) { | ||
if (err) throw err; | ||
}); | ||
} | ||
//写入源文件 | ||
console.log(importCentens); | ||
writeFileAtomic(totalUrl, importCentens+newBuf, {chown:{uid:100,gid:50}}, function (err) { | ||
if (err) throw err; | ||
}); | ||
}); | ||
} | ||
module.exports = fix; |
{ | ||
"name": "structor-tool-talentui", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "It can be used to move structor components to talentui just can used by beisen company", | ||
@@ -5,0 +5,0 @@ "author": "xhbisme", |
var fixStateReducer=require('./fixStateReducer.js'); | ||
function reducerImport(groupName,reducerName) { | ||
function reducerImport(groupName,reducerName) {//reducerName==componentName | ||
//将文件夹首字母大写 | ||
@@ -5,0 +5,0 @@ var dirReducerName = reducerName.replace(/(\w)/,function(v){ |
13373
266