Current collected state Current
Observed since 20 Oct, 17:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
- 自定义终端命令 入口文件 index.js,且其上配置运行环境 #!; npm init 初始化npm环境:生成package.json文件,同时在bin属性下配置终端命令;
自定义终端命令 入口文件 index.js,且其上配置运行环境 #!; npm init 初始化npm环境:生成package.json文件,同时在bin属性下配置终端命令;
version-help-option :帮助和可选信息 其实是分开的:我们在核心文件夹core下面做配置: version help option, 我们如何配置脚手架的基本信息;通过commander辅助创建脚手架;
创建create项目的命令:创建其他指令 先将github中的项目下载到本地 -> npm install安装项目依赖 -> npm run serve将项目运行起来 -> 打开浏览器
执行运行命令和打开浏览器
创建组件的流程和ejs模块
ejs模块的编译过程(重点) compile函数,在utils中的:主要是renderFile函数的运用
const compile = (template, data) => {
const templatePosition = `../templates/${template}`;
const templatePath = path.resolve(__dirname, templatePosition);
return new Promise((resolve, reject) => {
ejs.renderFile(templatePath, {data}, {}, (err, result) => {
if(err) {
console.log(err);
reject(err);
return;
}
resolve(result);
});
})
}
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 3 May 2022 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:2d2ea294cc3589265b334ee4c99f81ddcbbdb23d961f7e43d59d0b4a7ac5bc08