-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): generate api.json from .d.ts file
- Loading branch information
1 parent
59b8c79
commit a965013
Showing
4 changed files
with
5,444 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
includeDeclarations: true, | ||
json: paths.doc + '/api.json', | ||
name: paths.packageName + '-docs', | ||
mode: 'modules', | ||
excludeExternals: true, | ||
ignoreCompilerErrors: false, | ||
version: true | ||
})); | ||
}); | ||
|
||
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 | ||
); | ||
}); |
Oops, something went wrong.