forked from cibernox/ember-cli-yuidoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (26 loc) · 732 Bytes
/
index.js
File metadata and controls
33 lines (26 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'use strict';
var YuidocCompiler = require('broccoli-yuidoc-fork');
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')
}
}
};