structor-tool-talentui
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -33,3 +33,4 @@ 'use strict'; | ||
} | ||
for(var i=0;i<pa2.length;i++) { | ||
for(var i=0;i<pa2.length;i++) | ||
{ | ||
structorSrcUrl.push(params[3]+'/'+pa2[i]);//这里是要复制的文件s以及文件夹 | ||
@@ -42,15 +43,10 @@ } | ||
fixDirJsx(structorSrcUrl[i],tarUrl+'/'+pa2[i]); | ||
// var urlProps = tarFileName.split('.'); | ||
// if(urlProps.length==1){//如果是文件夹 | ||
// fixDirJsx(tarFileName); | ||
// } | ||
// else if(isJsx(tarFileName)){//如果是jsx文件--改成js | ||
// tarFileName=tarFileName.slice(0,tarFileName.length-2); | ||
// // } | ||
// copyDereferenceSync(structorSrcUrl[i],tarUrl+'/'+tarFileName); | ||
} | ||
if(params[3].toString().indexOf('controllers/')>0) { | ||
exec('cpDir fix '+params[1]+' '+params[2]); | ||
} | ||
}else{ | ||
reader('./groupUrl.txt',{encoding: 'utf8'}, function (err,buffer){ | ||
if(err || buffer==''){ | ||
cosole.err('there is no default value of srcUrl(whole url of groupName in structor), please use "cpDir-setGroupUrl ... " to set it.'); | ||
cosole.err('there is no default value of srcUrl(whole url of groupName in structor), please use "cpDir setGroup ... " to set it.'); | ||
return; | ||
@@ -62,3 +58,4 @@ } | ||
} | ||
for(var i=0;i<pa2.length;i++) { | ||
for(var i=0;i<pa2.length;i++) | ||
{ | ||
structorSrcUrl.push(buffer+'/'+pa2[i]);//这里是要复制的文件s以及文件夹 | ||
@@ -71,8 +68,6 @@ } | ||
fixDirJsx(structorSrcUrl[i],tarUrl+'/'+pa2[i]); | ||
// var urlProps = pa2[i].split('.'); | ||
// if(urlProps[1]=='jsx'){ | ||
// pa2[i]=pa2[i].slice(0,pa2[i].length-2); | ||
// // } | ||
// copyDereferenceSync(structorSrcUrl[i],tarUrl+'/'+pa2[i]); | ||
} | ||
if(buffer.toString().indexOf('controllers/')>0) { | ||
exec('cpDir fix '+params[1]+' '+params[2]); | ||
} | ||
}); | ||
@@ -79,0 +74,0 @@ } |
'use strict'; | ||
// var copyDir = require('copy-dir'); | ||
var writeFileAtomic = require('write-file-atomic'); | ||
/* | ||
*params[1]:组名路径 | ||
*/ | ||
function setGroup(params) { | ||
@@ -6,0 +8,0 @@ |
{ | ||
"name": "structor-tool-talentui", | ||
"version": "1.1.4", | ||
"description": "It can be used to move structor components to talentui", | ||
"version": "1.1.5", | ||
"description": "It can be used to move structor components to talentui just can used by beisen company", | ||
"author": "xhbisme", | ||
@@ -6,0 +6,0 @@ "license": "ISC", |
@@ -7,2 +7,7 @@ | ||
> - cpDir setGroup:Use to set base group url in structor | ||
--- | ||
> - cpDir move:Use to copy the file or directory to the target directory,if there is the target directory,please delete it. | ||
@@ -12,6 +17,11 @@ | ||
> - cpDir fix:Use to change the file of talent. | ||
> - cpDir fix:Use to change the file of talent. The ```cpDir move``` will do fix automatic. so you can ignore it. | ||
## Usage: | ||
> #### cpDir setGroup srcUrl | ||
> - srcUrl: source url of the structor,it is a whole name of the group which you used in structor. | ||
--- | ||
> - cpDir setGroup:Use to set base group url in structor | ||
## Usage: | ||
> #### cpDir move groupName componentNames [src] [tar] | ||
@@ -28,17 +38,12 @@ > - groupName:the name of the group which you have used in structor. | ||
--- | ||
> #### cpDir setGroup srcUrl | ||
> - srcUrl: source url of the structor,it is a whole name of the group which you used in structor. | ||
## Get Start: | ||
```npm install example-copy-directory -g``` | ||
```npm install structor-tool-talentui -g``` | ||
if your system is linux,please run | ||
```sudo npm install example-copy-directory -g``` | ||
```sudo npm install structor-tool-talentui -g``` | ||
## Notation | ||
make sure your current url is the root url of the TalentUI or the directory will be missed. |
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
46
9953
202