Separate gulp script for docs (#6409)

This commit is contained in:
Niels Lyngsø
2019-09-25 10:52:33 +02:00
committed by Sebastiaan Janssen
parent f2d8d3f44f
commit aafa314f0e
13 changed files with 3754 additions and 1226 deletions

View File

@@ -41,7 +41,7 @@ module.exports = {
"./src/views/**/*.{directive,component}.js"
],
out: "umbraco.directives.js"
},
}
},
//selectors for copying all views into the build

View File

@@ -1,55 +0,0 @@
'use strict';
var config = require('../config');
var gulp = require('gulp');
var connect = require('gulp-connect');
var open = require('gulp-open');
var gulpDocs = require('gulp-ngdocs');
/**************************
* Build Backoffice UI API documentation
**************************/
gulp.task('docs', [], function (cb) {
var options = {
html5Mode: false,
startPage: '/api',
title: "Umbraco Backoffice UI API Documentation",
dest: 'docs/api',
styles: ['docs/umb-docs.css'],
image: "https://our.umbraco.com/assets/images/logo.svg"
}
return gulpDocs.sections({
api: {
glob: ['src/common/**/*.js', 'docs/src/api/**/*.ngdoc'],
api: true,
title: 'API Documentation'
}
})
.pipe(gulpDocs.process(options))
.pipe(gulp.dest('docs/api'));
cb();
});
gulp.task('connect:docs', function (cb) {
connect.server({
root: 'docs/api',
livereload: true,
fallback: 'docs/api/index.html',
port: 8880
});
cb();
});
gulp.task('open:docs', function (cb) {
var options = {
uri: 'http://localhost:8880/index.html'
};
gulp.src(__filename)
.pipe(open(options));
cb();
});

View File

@@ -1,10 +0,0 @@
'use strict';
var config = require('../config');
var gulp = require('gulp');
var runSequence = require('run-sequence');
// Docserve - build and open the back office documentation
gulp.task('docserve', function(cb) {
runSequence('docs', 'connect:docs', 'open:docs', cb);
});