【文件属性】:
文件名称:npm-global-module-base:一个空白的npm全局模块,用于创建npm模块
文件大小:11KB
文件格式:ZIP
更新时间:2021-04-27 22:10:02
JavaScript
npm-global-module-base
一个空白的npm全局模块,用于创建npm模块
##设置1。
npm install
使用以下选项运行grunt init任务:
选项
描述
--name=
这是模块的名称
--repo=
这是git存储库(可选)
--author=
这是作者的名字(可选)
###例子
grunt init --name=exampleModule --repo=https://github.com/fahimc/npm-global-module-base.git --author=Fahim Chowdhury
##编写命令
模块的结构是模块化的,模块称为命令。 主文件是index.js,其中包含一个名为command的对象,在这里您将放置命令的名称,该值将是使用require导出的对象。
### command这是用户提供的执行任务的参数
【文件预览】:
npm-global-module-base-master
----Gruntfile.js(796B)
----src()
--------command()
--------logger.js(359B)
----LICENSE(18KB)
----README.md(1KB)
----.gitignore(526B)
----index.js(372B)
----package.json(549B)