【发布时间】:2014-06-14 07:02:30
【问题描述】:
我已经建立了一个非常简单的项目来测试 grunt-ngdocs (https://www.npmjs.org/package/grunt-ngdocs)。但是,当我尝试生成文档时,它无法识别任何 cmets。为什么?!救命!
Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
ngdocs: {
options:{dest: 'docs'},
api:{
src:['someCode.js'],
title:'API Documentation'
}
}
});
// Load the plugin that provide tasks.
grunt.loadNpmTasks('grunt-ngdocs');
};
someCode.js
/**
*
* This is a sample function
* @param x
* @returns {number}
*/
var myFunc = function(x){
return 2*x;
};
控制台输出:
slc058:ngDocPlay selah$ grunt ngdocs
Running "ngdocs:api" (ngdocs) task
Generating Documentation...
DONE. Generated 0 pages in 7ms.
Done, without errors.
【问题讨论】:
-
跟jsdoc有什么关系?
-
ngDoc 建立在 jsdoc 之上,语法非常相似
-
澄清一下,我认为ngDoc是jsdoc的超级定制版
标签: javascript gruntjs jsdoc