Change documentation generation to include json file within docs directory. Fix documentation deployment by adding .nojekyll before publishing.

This commit is contained in:
Matt Mazzola 2016-07-14 09:45:12 -07:00
Родитель 253d704075
Коммит bd5593bc70
2 изменённых файлов: 18 добавлений и 7 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -3,6 +3,5 @@ coverage
typings
dist
docs
docs.json
tmp
.publish

Просмотреть файл

@ -2,6 +2,7 @@ var gulp = require('gulp-help')(require('gulp'));
var del = require('del'),
ghPages = require('gulp-gh-pages'),
header = require('gulp-header'),
fs = require('fs'),
moment = require('moment'),
rename = require('gulp-rename'),
replace = require('gulp-replace'),
@ -40,15 +41,17 @@ gulp.task('test', 'Run all tests', function (done) {
);
});
gulp.task('ghpages', function () {
return gulp.src(['./docs/**/*'])
gulp.task('ghpages', 'Deploy documentation to gh-pages', ['nojekyll'], function () {
return gulp.src(['./docs/**/*'], {
dot: true
})
.pipe(ghPages({
force: true,
message: 'Update ' + moment().format('LLL')
}));
});
gulp.task("docs", function () {
gulp.task("docs", 'Compile documentation from src code', function () {
return gulp
.src(["src/**/*.ts"])
.pipe(typedoc({
@ -57,16 +60,25 @@ gulp.task("docs", function () {
// Output options (see typedoc docs)
out: "./docs",
json: "./docs.json",
json: "./docs/json/" + package.name + ".json",
// TypeDoc options (see typedoc docs)
ignoreCompilerErrors: true,
version: true,
tsConfig: './tsconfig.json'
version: true
}))
;
});
gulp.task('nojekyll', 'Add .nojekyll file to docs directory', function (done) {
fs.writeFile('./docs/.nojekyll', '', function (error) {
if (error) {
throw error;
}
done();
});
});
gulp.task('compile:ts', 'Compile source files', function () {
webpackConfig.plugins = [
new webpack.BannerPlugin(webpackBanner)