Socket
Socket
Sign inDemoInstall

yu-init

Package Overview
Dependencies
143
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

ectype/controller/controA.js

27

index.js
#!/usr/bin/env node
console.log(12345678)
const path = require('path');
const fs = require('fs');
const { getAllFiles } = require('yu-node');
let arr = path.resolve('./').split(path.sep);
let str = fs.readFileSync( path.resolve(__dirname,'./ectype/package.json'),'utf8' );
data = str.replace('test-1',arr[arr.length-1]);
fs.writeFileSync('./package.json',data);
let files = getAllFiles(path.resolve(__dirname,'./ectype'));
files.forEach(file=>{
let arr = file.split(path.sep);
let pathArr = arr.filter((key,i)=>{
return i>3 ? true : false;
});
let filePath = path.join(...pathArr);
let obj = path.parse(filePath);
if(obj.dir && !fs.existsSync(obj.dir)){
fs.mkdirSync(obj.dir);
}
if(obj.base.includes('package.json')) return;
let readStream = fs.createReadStream(file);
let writeStream = fs.createWriteStream(path.resolve('./',filePath));
readStream.pipe(writeStream);
});

9

package.json
{
"name": "yu-init",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

@@ -10,6 +10,9 @@ "main": "index.js",

"bin":{
"yu":"./index.js"
"yu-init":"./index.js"
},
"author": "",
"license": "ISC"
"license": "ISC",
"dependencies": {
"yu-node": "^1.0.8"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc