Skip to content

Commit

Permalink
feat(docs): generate api.json from .d.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichaelgraham committed Aug 12, 2015
1 parent 59b8c79 commit a965013
Show file tree
Hide file tree
Showing 4 changed files with 5,444 additions and 8 deletions.
33 changes: 26 additions & 7 deletions build/tasks/doc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
var gulp = require('gulp');
var tools = require('aurelia-tools');
var paths = require('../paths');
var yuidoc = require('gulp-yuidoc');
var typedoc = require("gulp-typedoc");
var typedocExtractor = require("gulp-typedoc-extractor");
var runSequence = require('run-sequence');

gulp.task('doc-generate', function(){
return gulp.src(paths.source)
.pipe(yuidoc.parser(null, 'api.json'))
.pipe(gulp.dest(paths.doc));
return gulp.src([paths.output + '*.d.ts', paths.doc + '/core-js.d.ts', './jspm_packages/github/aurelia/*/*.d.ts'])
.pipe(typedoc({
            target"es6",
            includeDeclarationstrue,
            jsonpaths.doc + '/api.json',
            namepaths.packageName + '-docs', 
mode: 'modules',
excludeExternals: true,
            ignoreCompilerErrorsfalse,
            versiontrue
        }));
});

gulp.task('doc', ['doc-generate'], function(){
tools.transformAPIModel(paths.doc);
gulp.task('doc-extract', function(){
return gulp.src([paths.doc + '/api.json'])
.pipe(typedocExtractor(paths.packageName))
.pipe(gulp.dest(paths.doc));
});

gulp.task('doc', function(callback){
return runSequence(
'doc-generate',
'doc-extract',
callback
);
});
Loading

0 comments on commit a965013

Please sign in to comment.