npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mokdoc

v0.2.0

Published

项目文档生成工具

Downloads

10

Readme

项目文档生成工具

从JavaScript代码里提取注释生成项目文档。注释规范及示例请移步到 mokdoc项目官网 查阅。

安装

npm install mokdoc

使用

  • mokdoc.config.set(projectName, conf) - 设置项目名称和对应的配置信息。

  • mokdoc.start(projectName, [callback]) - 开始生成文档。

下载默认的文档展示包 mokdoc-view ,放到你的任意磁盘目录下,然后将doc_path指到mokdoc-view里。

	var mokdoc = require('mokdoc');
	mokdoc.config.set('air', {
		path: 'D:/ws/air/trunk',	//源代码路径
		doc_path: 'D:/zzz',	//文档数据保存到哪里(要放到文档展示包里)
		exclude_list: ['/test/', '/util/xxx.js']
	});
	mokdoc.start('air', function(){
		console.log('Yes, done!');
	});
	//可以给默认的标签设置别名
	var mokdoc = require('mokdoc');
	mokdoc.config.set('air', {
		path: 'D:/ws/air/trunk',
		doc_path: 'D:/zzz',
		//标签别名与标签的映射
		alias2tagid: {
			'return': 'r',
			'version': 'ver'	//设置后version与ver等效,两个标签都可以使用
		}
	});

配置项说明

  • path - 源代码路径

  • doc_path - 文档数据保存到哪里(要放到文档展示包里)

  • charset - 源代码的文件编码。可选,默认utf8

  • alias2tagid - 标签别名与标签的映射。可选

  • file_ext - 只提取指定类型文件的注释。可选,默认.js

  • exclude_list - 排除列表(数组),排除文件路径(包含文件名)中出现该列表指定的字符串的文件。可选

使用mokdoc生成文档的实例

air组件库API:http://mokjs.com/air-api

版本发布记录

请看 CHANGELOG.md