Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

structor-tool-talentui

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

structor-tool-talentui - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

tools/fixStateReducer.js

4

bin/cpDir.js

@@ -6,5 +6,5 @@ #!/usr/bin/env node

var move = require('./move.js');
var setGroup =require('./setGroup.js');
var setGroup = require('./setGroup.js');
var params = process.argv.splice(2);
console.log(params);
// console.log(params[0]+params[1]+params[2]+params[3])

@@ -11,0 +11,0 @@ var order = {'fix':fix,

@@ -6,2 +6,3 @@ 'use strict';

var reducerImport = require('../tools/getImportReducer.js');
var fixStateReducer=require('../tools/fixStateReducer.js');
//取得参数

@@ -33,3 +34,3 @@ /*

importCentens+=reducerImport(groupName,componentName[i]);
componentNames+="\n "+componentName[i]+",";
componentNames+="\n "+fixStateReducer(componentName[i])+",";
}

@@ -51,2 +52,3 @@ //改buffer

//写入源文件
console.log(importCentens);
writeFileAtomic(totalUrl, importCentens+newBuf, {chown:{uid:100,gid:50}}, function (err) {

@@ -53,0 +55,0 @@ if (err) throw err;

@@ -28,3 +28,3 @@ 'use strict';

}
console.log(tarUrl);
if(params[3]){

@@ -34,4 +34,9 @@ for(var i=0;i<pa2.length;i++) {

}
//复制文件--命名相同
for(var i=0;i<pa2.length;i++)
{
copyDereferenceSync(structorSrcUrl[i],tarUrl+'/'+pa2[i]);
}
}else{
reader('../groupUrl.txt',{encoding: 'utf8'}, function (err,buffer){
reader('./groupUrl.txt',{encoding: 'utf8'}, function (err,buffer){
if(err || buffer==''){

@@ -42,11 +47,12 @@ cosole.err('there is no default value of srcUrl(whole url of groupName in structor), please use "cpDir-setGroupUrl ... " to set it.');

for(var i=0;i<pa2.length;i++) {
structorSrcUrl.push(buffer+'/'+pa2[i]);//这里是要复制的文件s
structorSrcUrl.push(buffer+'/'+pa2[i]);//这里是要复制的文件s以及文件夹
}
//复制文件--命名相同
for(var i=0;i<pa2.length;i++)
{
copyDereferenceSync(structorSrcUrl[i],tarUrl+'/'+pa2[i]);
}
});
}
//复制文件--命名相同
for(var i=0;i<pa2.length;i++)
{
copyDereferenceSync(structorSrcUrl[i],tarUrl+'/'+pa2[i]);
}
})

@@ -53,0 +59,0 @@ }

{
"name": "structor-tool-talentui",
"version": "1.1.2",
"version": "1.1.3",
"description": "It can be used to move structor components to talentui",

@@ -5,0 +5,0 @@ "author": "xhbisme",

@@ -0,8 +1,12 @@

var fixStateReducer=require('./fixStateReducer.js');
function reducerImport(groupName,reducerName) {
//将首字母大写
var newReducerName = reducerName.replace(/(\w)/,function(v){
//将文件夹首字母大写
var dirReducerName = reducerName.replace(/(\w)/,function(v){
return v.toUpperCase()
});
return "import " + reducerName + " from '../../components/" + groupName + "/" + newReducerName + "/reducer.js';\n";
return "import " + fixStateReducer(reducerName) + " from '../../components/" + groupName + "/" + dirReducerName + "/reducer.js';\n";
}
module.exports = reducerImport;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc