@render-web/init
Advanced tools
+33
-3
| 'use strict'; | ||
| const fs = require("fs"); | ||
| const Command = require("@render-web/Command"); | ||
| function index(name,cmd) { | ||
| console.log(name,cmd,process.env.CLI_TARGET_PATH) | ||
| class InitCommand extends Command { | ||
| init() { | ||
| console.log('init') | ||
| } | ||
| exec() { | ||
| this.prepare(); | ||
| } | ||
| prepare() { | ||
| // 1.判断当前路径是否为空 | ||
| if (!this.isCwdEmpty()) { | ||
| } | ||
| // 2.是否启动强制更新 | ||
| // 3.选择创建项目还是组件 | ||
| // 4.获取项目的基本信息 | ||
| } | ||
| isCwdEmpty(){ | ||
| const localPath = process.cwd(); | ||
| console.log("localPath",localPath); | ||
| let fileList = fs.readdirSync(localPath); | ||
| console.log(fileList) | ||
| } | ||
| } | ||
| module.exports = index; | ||
| function init(argv) { | ||
| // console.log(name, cmd, process.env.CLI_TARGET_PATH) | ||
| return new InitCommand(argv); | ||
| } | ||
| module.exports = init; | ||
| module.exports.InitCommand = InitCommand; |
+5
-2
| { | ||
| "name": "@render-web/init", | ||
| "version": "0.0.9", | ||
| "version": "0.0.10", | ||
| "description": "> TODO: description", | ||
@@ -26,3 +26,6 @@ "author": "不动声色 <1609059419@qq.com>", | ||
| }, | ||
| "gitHead": "7a6a4ee4bef8d3187f551f87be39954c2db084cc" | ||
| "dependencies": { | ||
| "@render-web/Command": "file:../../models/Command" | ||
| }, | ||
| "gitHead": "2fc8a9d59a4f6d850769c7e2302d5395b5113332" | ||
| } |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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.
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
1624
93.33%30
650%1
-50%1
Infinity%