node-hello-1-17y
Advanced tools
Comparing version 1.0.2 to 2.0.0
63
index.js
#!/usr/bin/env node | ||
var name = process.argv[2]; | ||
var shell = require("shelljs"); | ||
// var name = process.argv[2]; | ||
// var shell = require("shelljs"); | ||
// | ||
// shell.exec("echo hello " + name); | ||
// shell.mkdir('-p', "nihao") | ||
// if (!shell.which('git')) { | ||
// shell.echo('Sorry, this script requires git'); | ||
// shell.exit(1); | ||
// } | ||
// | ||
// shell.exec('git clone "git@git.guazi-corp.com:bi/bi_fe.git"') | ||
// | ||
shell.exec("echo hello " + name); | ||
shell.mkdir('-p', "nihao") | ||
if (!shell.which('git')) { | ||
shell.echo('Sorry, this script requires git'); | ||
shell.exit(1); | ||
} | ||
const path = require('path'); | ||
const chalk = require('chalk'); | ||
const fs = require('fs-extra'); | ||
const inquirer = require('inquirer'); | ||
const ora = require('ora'); | ||
const download = require('download-git-repo'); | ||
const exists = require('fs').existsSync; | ||
shell.exec('git clone "git@git.guazi-corp.com:bi/bi_fe.git"') | ||
const cwd = process.cwd(); | ||
const origin = 'goWrongWay/React-Redux-Saga-Reselect-Starter-Kit'; | ||
const questions = [{ | ||
type: 'input', | ||
name: 'name', | ||
message: 'input project name:', | ||
}, { | ||
type: 'input', | ||
name: 'path', | ||
message: 'witch directory do you want to init to ? (default is current directory ./):', | ||
}]; | ||
inquirer.prompt(questions).then(function (answers) { | ||
const projectName = answers.name || 'React-Redux-Saga-Reselect-Starter-Kit'; | ||
const targetPath = path.join(cwd, answers.path || './'); | ||
if (exists(path.join(targetPath, projectName))) { | ||
console.log(chalk.red('exit: template is already exists')); | ||
return; | ||
} | ||
const spinner = ora('downloading template...'); | ||
spinner.start(); | ||
download(origin, path.join(targetPath, projectName), { clone: false }, function (err) { | ||
spinner.stop(); | ||
if (err) { | ||
console.log(chalk.red(`Failed to download repo https://github.com/${origin}`, err)); | ||
} else { | ||
console.log(chalk.green(`Success to download repo https://github.com/${origin} to ${targetPath}`)); | ||
} | ||
}) | ||
}); |
{ | ||
"name": "node-hello-1-17y", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"dependencies": { | ||
"chalk": "^2.3.0", | ||
"download-git-repo": "^1.0.1", | ||
"fs-extra": "^4.0.2", | ||
"inquirer": "^3.3.0", | ||
"ora": "^1.3.0", | ||
"shelljs": "^0.7.8" | ||
@@ -8,0 +13,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
19891
49
0
6
3
+ Addedchalk@^2.3.0
+ Addeddownload-git-repo@^1.0.1
+ Addedfs-extra@^4.0.2
+ Addedinquirer@^3.3.0
+ Addedora@^1.3.0
+ Addedansi-escapes@3.2.0(transitive)
+ Addedansi-regex@3.0.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@1.2.3(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-crc32@0.2.13(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedcapture-stack-trace@1.0.2(transitive)
+ Addedcaw@2.0.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedchardet@0.4.2(transitive)
+ Addedcli-cursor@2.1.0(transitive)
+ Addedcli-spinners@1.3.1(transitive)
+ Addedcli-width@2.2.1(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedconfig-chain@1.1.13(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcreate-error-class@3.0.2(transitive)
+ Addeddecompress@4.2.1(transitive)
+ Addeddecompress-tar@4.1.1(transitive)
+ Addeddecompress-tarbz2@4.1.1(transitive)
+ Addeddecompress-targz@4.1.1(transitive)
+ Addeddecompress-unzip@4.0.1(transitive)
+ Addeddownload@5.0.3(transitive)
+ Addeddownload-git-repo@1.1.0(transitive)
+ Addedduplexer3@0.1.5(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexternal-editor@2.2.0(transitive)
+ Addedfd-slicer@1.1.0(transitive)
+ Addedfigures@2.0.0(transitive)
+ Addedfile-type@3.9.05.2.06.2.0(transitive)
+ Addedfilename-reserved-regex@2.0.0(transitive)
+ Addedfilenamify@2.1.0(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedfs-extra@4.0.3(transitive)
+ Addedget-proxy@2.1.0(transitive)
+ Addedget-stream@2.3.13.0.0(transitive)
+ Addedgit-clone@0.1.0(transitive)
+ Addedgot@6.7.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedhas-symbol-support-x@1.4.2(transitive)
+ Addedhas-to-string-tag-x@1.4.1(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedini@1.3.8(transitive)
+ Addedinquirer@3.3.0(transitive)
+ Addedis-fullwidth-code-point@2.0.0(transitive)
+ Addedis-natural-number@4.0.1(transitive)
+ Addedis-object@1.0.2(transitive)
+ Addedis-redirect@1.0.0(transitive)
+ Addedis-retry-allowed@1.2.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisurl@1.0.0(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlog-symbols@2.2.0(transitive)
+ Addedlowercase-keys@1.0.1(transitive)
+ Addedmake-dir@1.3.0(transitive)
+ Addedmimic-fn@1.2.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedmute-stream@0.0.7(transitive)
+ Addednpm-conf@1.1.3(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonetime@2.0.1(transitive)
+ Addedora@1.4.0(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpend@1.2.0(transitive)
+ Addedpify@2.3.03.0.0(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedprepend-http@1.0.4(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedproto-list@1.2.4(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedrestore-cursor@2.0.0(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrx-lite@4.0.8(transitive)
+ Addedrx-lite-aggregates@4.0.8(transitive)
+ Addedsafe-buffer@5.1.25.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedseek-bzip@1.0.6(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstring-width@2.1.1(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
+ Addedstrip-dirs@2.1.0(transitive)
+ Addedstrip-outer@1.0.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedtar-stream@1.6.2(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtimed-out@4.0.1(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedto-buffer@1.1.1(transitive)
+ Addedtrim-repeated@1.0.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedunbzip2-stream@1.4.3(transitive)
+ Addeduniversalify@0.1.2(transitive)
+ Addedunzip-response@2.0.1(transitive)
+ Addedurl-parse-lax@1.0.0(transitive)
+ Addedurl-to-options@1.0.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)
+ Addedyauzl@2.10.0(transitive)