New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@easyv/cli

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@easyv/cli - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

package.json
{
"name": "@easyv/cli",
"version": "1.0.12",
"version": "1.0.13",
"description": "Easy[V] component tools",

@@ -5,0 +5,0 @@ "engines": {

@@ -5,5 +5,2 @@ const validateProjectName = require('validate-npm-package-name');

const chalk = require('chalk');
const cmd = require('cross-spawn');
const execSync = require('child_process').execSync;
const os = require('os');
const { appRoot, appPackage, getPluginRoot } = require('./paths');

@@ -59,45 +56,45 @@ const generate = require('./generate');

const builers = {
'react': 'react-component-builder'
}
// 默认创建react项目
const withBuilders = builers['react'];
// const builers = {
// 'react': 'react-component-builder'
// }
// // 默认创建react项目
// const withBuilders = builers['react'];
checkNameDuplication(folderName);
// checkNameDuplication(folderName);
console.log();
console.log(chalk.blueBright(`Creating a new easyv project`));
console.log();
// console.log();
// console.log(chalk.blueBright(`Creating a new easyv project`));
// console.log();
const dir = path.resolve(folderName)
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir)
}
// const dir = path.resolve(folderName)
// if (!fs.existsSync(dir)) {
// fs.mkdirSync(dir)
// }
// 生成package.json
const createdBy = withBuilders;
const templatePackage = require(`./template/${createdBy}.package.json`);
templatePackage.name = folderName;
templatePackage.easyv.by = createdBy;
fs.writeFileSync(
path.join(appRoot, 'package.json'),
JSON.stringify(templatePackage, null, 2) + os.EOL
);
// // 生成package.json
// const createdBy = withBuilders;
// const templatePackage = require(`./template/${createdBy}.package.json`);
// templatePackage.name = folderName;
// templatePackage.easyv.by = createdBy;
// fs.writeFileSync(
// path.join(appRoot, 'package.json'),
// JSON.stringify(templatePackage, null, 2) + os.EOL
// );
// copy 用例
const appPackageJSON = require(appPackage);
const componentsPath = path.join(appRoot, appPackageJSON.easyv.components)
fs.mkdirSync(componentsPath, { recursive: true })
// // copy 用例
// const appPackageJSON = require(appPackage);
// const componentsPath = path.join(appRoot, appPackageJSON.easyv.components)
// fs.mkdirSync(componentsPath, { recursive: true })
// 下载包
yarnVersion = execSync('yarnpkg --version')
.toString()
.trim();
if (yarnVersion) {
cmd.sync('yarn', ['install', '--registry=https://registry.npm.taobao.org'], { stdio: 'inherit', cwd: appRoot });
} else {
cmd.sync('npm', ['install', '--registry=https://registry.npm.taobao.org'], { stdio: 'inherit', cwd: appRoot });
}
// // 下载包
// yarnVersion = execSync('yarnpkg --version')
// .toString()
// .trim();
// if (yarnVersion) {
// cmd.sync('yarn', ['install', '--registry=https://registry.npm.taobao.org'], { stdio: 'inherit', cwd: appRoot });
// } else {
// cmd.sync('npm', ['install', '--registry=https://registry.npm.taobao.org'], { stdio: 'inherit', cwd: appRoot });
// }
await generate()
await generate();

@@ -104,0 +101,0 @@ console.log();

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

const run = require(path.join(getPluginRoot(packageJSON.easyv.by), 'launcher/generate.js'));
run()
return run()
}
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