generatecomment
v1.0.6
Published
add directory comment
Downloads
42
Readme
generateComment
根据git记录生成文件的头部信息(前提是该项目有git仓库)
/*
@ Description: This is a discription
@ Author: [email protected]
@ CreatedTime: 2018-03-07 15:43:56
@ LastEditor: [email protected]
@ LastEditTime: 2019-01-10 11:37:17
*/第一步 安装依赖
npm i generatecomment第二步 创建脚本文件
在项目根目录下创建comment.js文件,复制以下内容到文件中
const path = require('path');
const comment = require("generatecomment");
comment({
// 表示当前目录下test文件夹下的所有的js文件添加注释
filePath: path.resolve(__dirname, "./test/"),
fileSuffix: "js"
})第三步 运行脚本文件
node comment.js