Skip to content

Commit b7573b7

Browse files
Merge branch 'feature-typedoc-generator' of https://github.com/cmichaelgraham/framework into cmichaelgraham-feature-typedoc-generator
2 parents da0756f + 38c06e2 commit b7573b7

File tree

4 files changed

+1340
-8
lines changed

4 files changed

+1340
-8
lines changed

build/tasks/doc.js

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
var gulp = require('gulp');
2-
var tools = require('aurelia-tools');
32
var paths = require('../paths');
4-
var yuidoc = require('gulp-yuidoc');
3+
var typedoc = require("gulp-typedoc");
4+
var typedocExtractor = require("gulp-typedoc-extractor");
5+
var runSequence = require('run-sequence');
56

67
gulp.task('doc-generate', function(){
7-
return gulp.src(paths.source)
8-
.pipe(yuidoc.parser(null, 'api.json'))
9-
.pipe(gulp.dest(paths.doc));
8+
return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/github/aurelia/*/*.d.ts'])
9+
.pipe(typedoc({
10+
            target"es6",
11+
            includeDeclarationstrue,
12+
            jsonpaths.doc + '/api.json',
13+
            namepaths.packageName + '-docs', 
14+
mode: 'modules',
15+
excludeExternals: true,
16+
            ignoreCompilerErrorsfalse,
17+
            versiontrue
18+
        }));
1019
});
1120

12-
gulp.task('doc', ['doc-generate'], function(){
13-
tools.transformAPIModel(paths.doc);
21+
gulp.task('doc-extract', function(){
22+
return gulp.src([paths.doc + '/api.json'])
23+
.pipe(typedocExtractor(paths.packageName))
24+
.pipe(gulp.dest(paths.doc));
1425
});
26+
27+
gulp.task('doc', function(callback){
28+
return runSequence(
29+
'doc-generate',
30+
'doc-extract',
31+
callback
32+
);
33+
});

0 commit comments

Comments
 (0)