🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@chenxihub/sweet-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chenxihub/sweet-cli - npm Package Compare versions

Comparing version
0.0.2
to
0.0.3
+0
-29
bin/sweet.js
#!/usr/bin/env node
//check node version before requiring/doing anything else
const chalk = require("chalk");
const requiredVersion = require("../package.json").engines.node;
const semver = require("semver");
const didYouMean = require("didyoumean");
didYouMean.threshold = 0.6;
function checkNodeVersion(wanted, id) {
if (!semver.satisfies(process.version, wanted)) {
console.log(chalk.red(
"You are using Node " + process.version + ", but this version of " + id +
" requires Node " + wanted + ".\nPlease upgrade your Node version.",
));
}
process.exit(1);
}
checkNodeVersion(requiredVersion, "sweet-cli");
if (semver.satisfies(process.version, "9.x")) {
console.log(chalk.red(
`You are using Node ${process.version}.\n` +
`Node.js 9.x has already reached end-of-life and will not be supported in future major releases.\n` +
`It's strongly recommended to use an active LTS version instead.`,
));
}
const yargs = require("yargs");

@@ -33,0 +4,0 @@ const info = require("../lib/info");

+3
-1
{
"name": "@chenxihub/sweet-cli",
"version": "0.0.2",
"version": "0.0.3",
"private": false,

@@ -25,2 +25,3 @@ "description": "Chen Xi Common Vue Cli Template",

"dependencies": {
"@chenxihub/sweet-cli": "^0.0.2",
"chalk": "^2.4.2",

@@ -32,2 +33,3 @@ "commander": "^2.20.0",

"fs-extra": "^8.1.0",
"global": "^4.4.0",
"inquirer": "^6.4.1",

@@ -34,0 +36,0 @@ "jsonfile": "^5.0.0",

Sorry, the diff of this file is too big to display