我是靠谱客的博主 健壮白昼,这篇文章主要介绍angularjs ngdocs 使用grunt生成api文档说明,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部