-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
a823d83
commit 9362b80
Showing
3 changed files
with
40 additions
and
7 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 | ||
); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module 'core-js' { | ||
var coreJs; | ||
export default coreJs; | ||
} |
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 |
---|---|---|
|
@@ -22,6 +22,13 @@ | |
"format": "amd", | ||
"directories": { | ||
"lib": "dist/amd" | ||
}, | ||
"devDependencies": { | ||
"babel": "npm:babel-core@^5.1.13", | ||
"babel-runtime": "npm:babel-runtime@^5.1.13", | ||
"core-js": "npm:core-js@^0.9.5", | ||
"traceur": "github:jmcriffey/[email protected]", | ||
"traceur-runtime": "github:jmcriffey/[email protected]" | ||
} | ||
}, | ||
"devDependencies": { | ||
|
@@ -34,6 +41,8 @@ | |
"gulp-bump": "^0.3.1", | ||
"gulp-jshint": "^1.9.0", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-typedoc": "^1.2.1", | ||
"gulp-typedoc-extractor": "^0.0.8", | ||
"gulp-yuidoc": "^0.1.2", | ||
"jasmine-core": "^2.1.3", | ||
"jshint-stylish": "^1.0.0", | ||
|
@@ -46,6 +55,7 @@ | |
"object.assign": "^1.0.3", | ||
"require-dir": "^0.1.0", | ||
"run-sequence": "^1.0.2", | ||
"vinyl": "^0.5.1", | ||
"vinyl-paths": "^1.0.0", | ||
"yargs": "^2.1.1" | ||
}, | ||
|