Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

commander-scripts-ivan

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commander-scripts-ivan - npm Package Compare versions

Comparing version
0.0.16
to
0.0.17
+7
-21
commander-scripts-ivan-starter.js

@@ -18,8 +18,2 @@ #!/usr/bin/env node

process.on('unhandledRejection', (err) => {
red('unhandledRejection')
console.error(err)
throw err
})
// 创建项目指令处理

@@ -55,20 +49,12 @@ let name

try {
execSync('cnpm --version', { stdio: 'ignore' })
execSync('yarn --version', { stdio: 'ignore' })
return {
command: 'cnpm',
command: 'yarn',
args: ['add', '-D', '-E', STARTER],
}
} catch (err) {
return {
command: 'npm',
args: ['install', '-D', '-E', STARTER],
}
} catch (e) {
try {
execSync('yarn --version', { stdio: 'ignore' })
return {
command: 'yarn',
args: ['add', '-D', '-E', STARTER],
}
} catch (err) {
return {
command: 'npm',
args: ['install', '-D', '-E', STARTER],
}
}
}

@@ -75,0 +61,0 @@ }

@@ -9,2 +9,9 @@ #!/usr/bin/env node

// eslint-disable-next-line prefer-arrow-callback
process.on('unhandledRejection', function getError(err) {
console.error(chalk.red('UnhandledRejection'))
console.error(err)
throw err
})
// 检测Node.js版本前运行代码纯ES5

@@ -31,3 +38,4 @@ var packageJson = require('./package.json') // eslint-disable-line

.command('starter <project-directory> [options...]', 'starter new web project use web-scripts-ivan')
.command('copy <project-directory> [options...]', 'copy new web project from <craete react app>')
.alias('s')
.parse(process.argv)
{
"name": "commander-scripts-ivan",
"version": "0.0.16",
"version": "0.0.17",
"description": "Node.js命令行脚本",

@@ -5,0 +5,0 @@ "bin": "./commander-scripts-ivan.js",