读取注释
简单读取文件注释
install
npm install easy-note
examples
test.js
/**测试配置 * @autohr wolfs * @create 2016/8/30. */ { /**测试test1 * @p1 p1是一个参数 * @p2 p2是一个string * 补充描述 */ this{ } } /**测试test2 * @p3 p3是参数 * @p4 @@{max:100,min:10,required:1} 这是测试 */ testprototype{ } moduleexports=test;
then
var parse=;var fs=; var file="./test.js"; fs
output
__title: __title: '测试配置' autohr: 'wolfs' create: '2016/8/30.' test1: __title: '测试test1' p1: 'p1是一个参数' p2: 'p2是一个string\n补充描述' test2: __title: '测试test2' p3: 'p3是参数' p4: '@@{max:100,min:10,required:1} 这是测试'