ngdocs的安装说明:
1.先下载这个包
在命令行执行:npm install grunt-ngdocs --save-dev
2.在gruntfile.js 里面加入这个任务
grunt.loadNpmTasks('grunt-ngdocs');
3.在gruntfile.js 文件中的grunt.initConfig()接口加入配置信息如下:
ngdocs: {
options: {
dest: 'docs',
html5Mode: false,
scripts: [
'bower_components/angular/angular.js',
'bower_components/angular-animate/angular-animate.js'
]
},
api: {
src: ['app/**/*.js', '!app/**/*-spec.js'],
title: 'Docs'
}
}
4.在命令行执行grunt ngdocs 生成一个docs文件夹并产生index.html就是产生的文档说明了
最后
以上就是健壮白昼最近收集整理的关于angularjs ngdocs 使用grunt生成api文档说明的全部内容,更多相关angularjs内容请搜索靠谱客的其他文章。
发表评论 取消回复