【问题标题】:How to use jsdoc options in jsdoc-grunt task如何在 jsdoc-grunt 任务中使用 jsdoc 选项
【发布时间】:2016-06-29 22:42:35
【问题描述】:

我想添加-p 标志,以便使用grunt-jsdoc 生成私有方法的文档。我该怎么做?

根据grunt-jsdoc 的文档,他们声明我们可以使用useJsDocCli 中指定的任何选项,但是不知道应该如何在 grunt 任务中指定它们。这是我当前的繁重任务:

jsdoc : {
            dist : {
                src: ['app/scripts/directives/*.js','README.md'],
                options: {
                    destination: 'doc'
                }
            }
        }

如何指定我希望使用-p 标志(或任何其他标志)运行任务?

【问题讨论】:

    标签: jsdoc3


    【解决方案1】:

    在模板部分https://github.com/krampstudio/grunt-jsdoc#templates下的文档中有一个示例

    只需使用不带破折号的标志名称,例如:

    dist : {
        src: ['app/scripts/directives/*.js','README.md'],
            options: {
              destination: 'doc',
              private: true
            }
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2015-10-29
      • 2016-06-30
      • 2019-11-25
      • 1970-01-01
      • 2014-05-11
      • 2016-06-03
      • 2012-04-27
      • 1970-01-01
      • 2020-07-23
      相关资源
      最近更新 更多