<commit_before>'use strict';

var YuidocCompiler = require('broccoli-yuidoc');
var mergeTrees = require('broccoli-merge-trees');

module.exports = {
  name: 'ember-cli-yuidoc',

  postprocessTree: function(type, workingTree) {
    var codeFolder = this.app.constructor.name === 'EmberAddon' ? 'addon' : 'app';

    var yuidocTree = new YuidocCompiler(codeFolder, {
      srcDir: '/',
      destDir: '/docs',
      yuidoc: {}
    });

    return mergeTrees([workingTree, yuidocTree]);
  },

  included: function(app){
    this.app = app;
  },

  includedCommands: function() {
    return {
      'yuidoc': require('./lib/commands/yuidoc')
    }
  }
};<commit_msg>Don't generate documentation in production env<commit_after>'use strict';

var YuidocCompiler = require('broccoli-yuidoc');
var mergeTrees = require('broccoli-merge-trees');

module.exports = {
  name: 'ember-cli-yuidoc',

  postprocessTree: function(type, workingTree) {
    if (this.app.env !== 'development' || type !== 'all'){
      return workingTree;
    }

    var codeFolder = this.app.constructor.name === 'EmberAddon' ? 'addon' : 'app';
    var yuidocTree = new YuidocCompiler(codeFolder, {
      srcDir: '/',
      destDir: '/docs',
      yuidoc: {}
    });

    return mergeTrees([workingTree, yuidocTree]);
  },

  included: function(app){
    this.app = app;
  },

  includedCommands: function() {
    return {
      'yuidoc': require('./lib/commands/yuidoc')
    }
  }
};
{'fraction_non_alphanumeric': 0.16298342541436464, 'fraction_numerical': 0.0, 'mean_word_length': 3.3513513513513513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3237290', 'n_tokens_mistral': 500, 'n_tokens_neox': 483, 'n_words': 92}