LoginSignup
0

More than 5 years have passed since last update.

YEOMANでyuidocを扱う

Posted at

grunt-contrib-yuidocをインストール

$ npm install grunt-contrib-yuidoc --save-dev

なお、アンインストールしたいときは以下のコマンドを実行する。

$ npm uninstall grunt-contrib-yuidoc --save-dev

Gruntfile.jsを修正

yuidocタスクを作成する

・・・
yuidoc: {
  compile: {
    name: '<%= yeoman.name %>'
  , description: '<%= yeoman.description %>'
  , options: {
      paths: '<%= yeoman.app %>/scripts/hoge/'
    , linkNatives: 'true'
    , outdir: '<%= yeoman.app %>/scripts/hoge/doc'  
    }
  }
},
・・・

<%= yeoman.name %> および <%= yeoman.description %>は、appConfig を定義している箇所で追記しておいた。

作成したyuidocタスクをwatchタスクに組み入れる

watch: {
  yuidoc: {
    files: ['<%= yeoman.app %>/scripts/hoge.js'],
    tasks: ['yuidoc:compile'],
    options: {
        libereload: true
    }
  },
  ・・・

だけども。。。

生成されたドキュメント内に、ソースコードを含めたくない。

以前、yuidocをコマンドラインから実行するときは、この記事で書いた様なやり方があったんだけど、今回のやり方だとマニュアルを見ても、どうもできなさそうな気が・・・

この辺り、どなたか 解決策あれば教えて欲しいですっ。。。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0