ember-cli-yuidoc
Advanced tools
Comparing version
@@ -5,23 +5,32 @@ 'use strict'; | ||
var rsvp = require('rsvp'); | ||
var path = require('path'); | ||
var CachingWriter = require('broccoli-caching-writer'); | ||
var BroccoliYuidoc = CachingWriter.extend({ | ||
updateCache: function(srcPaths, destDir) { | ||
this.paths = this.paths || srcPaths; | ||
this.outdir = [destDir, this.destDir].join('/'); | ||
BroccoliYuidoc.prototype = Object.create(CachingWriter.prototype); | ||
BroccoliYuidoc.prototype.constructor = BroccoliYuidoc; | ||
function BroccoliYuidoc(inputNodes, options) { | ||
this.options = options || {}; | ||
var json = (new Y.YUIDoc(this)).run(); | ||
CachingWriter.call(this, inputNodes, { | ||
annotation: this.options.annotation | ||
}); | ||
}; | ||
if (this.yuidoc.parseOnly) { | ||
return; | ||
} | ||
BroccoliYuidoc.prototype.build = function() { | ||
this.paths = this.inputPaths; | ||
this.outdir = path.resolve(this.outputPath, this.options.destDir); | ||
var builder = new Y.DocBuilder(this, json); | ||
var json = (new Y.YUIDoc(this)).run(); | ||
return new rsvp.Promise(function(resolve) { | ||
builder.compile(function() { resolve(); }); | ||
}); | ||
if (this.options.yuidoc.parseOnly) { | ||
return; | ||
} | ||
}); | ||
var builder = new Y.DocBuilder(this, json); | ||
return new rsvp.Promise(function(resolve) { | ||
builder.compile(function() { resolve(); }); | ||
}); | ||
} | ||
module.exports = BroccoliYuidoc; |
@@ -46,2 +46,3 @@ 'use strict'; | ||
paths: config.options.paths || '.', | ||
ignorePaths: ['tmp', 'node_modules'], | ||
version: getVersion(), | ||
@@ -48,0 +49,0 @@ external: config.external || config.options.external || {}, |
{ | ||
"name": "ember-cli-yuidoc", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Generate documentation of your app/addon from your yuidoc comments", | ||
@@ -21,3 +21,3 @@ "directories": { | ||
"dependencies": { | ||
"broccoli-caching-writer": "~0.5.5", | ||
"broccoli-caching-writer": "~2.0.4", | ||
"broccoli-merge-trees": "0.2.1", | ||
@@ -38,3 +38,3 @@ "git-repo-version": "0.2.0", | ||
"ember-cli-qunit": "0.3.10", | ||
"ember-cli-release": "0.2.4", | ||
"ember-cli-release": "0.2.8", | ||
"ember-cli-uglify": "1.0.1", | ||
@@ -53,2 +53,2 @@ "ember-data": "1.0.0-beta.16.1", | ||
} | ||
} | ||
} |
10886
3.04%176
4.76%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed