summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2016-03-07 11:32:05 +0200
committerTeemu Pöntelin <teemu@vaadin.com>2016-04-27 11:14:53 +0300
commitf17cc76e59b5263873a11843f7f16e80d2aa00b3 (patch)
tree825b7514e8bff028c768cc15ba82af7cf0e24b4c /tasks
parent9ffbcd60a7f72629de0d6ee18233121fea47ba6a (diff)
downloadvaadin-core-f17cc76e59b5263873a11843f7f16e80d2aa00b3.tar.gz
vaadin-core-f17cc76e59b5263873a11843f7f16e80d2aa00b3.zip
Publish asciidocs from combo-box, upload, date-picker.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/docsite.js33
1 files changed, 23 insertions, 10 deletions
diff --git a/tasks/docsite.js b/tasks/docsite.js
index 3888808..9f39433 100644
--- a/tasks/docsite.js
+++ b/tasks/docsite.js
@@ -8,6 +8,7 @@ var gutil = require('gulp-util');
var zip = require('gulp-zip');
var args = require('yargs').argv;
var addsrc = require('gulp-add-src');
+var rename = require('gulp-rename');
var stagingBasePath = config.paths.staging.cdn;
var docPath = config.paths.staging.doc;
@@ -49,17 +50,23 @@ gulp.task('cdn:docsite:core-elements-integrations', function() {
return getDocModifyTask('demo/**', docPath + '/integrations');
});
-var doctasks = ['cdn:docsite:core-elements', 'cdn:docsite:core-elements-integrations'];
+gulp.task('cdn:docsite:core-elements-elements', ['cdn:docsite:bower_components'], function() {
+ var docsPaths = config.coreElements.map(function(c) {
+ return stagingPath + '/' + c + '/docs/**';
+ });
-config.coreElements.forEach(function (n) {
- var task = 'cdn:docsite:' + n;
- doctasks.push(task);
- gulp.task(task, ['cdn:docsite:bower_components'], function(done) {
- var elementDocsite = docPath + '/' + n;
- var elementDemo = stagingPath + '/' + n + '/demo/**';
+ return gulp.src(docsPaths, {base: stagingPath})
+ .pipe(rename(function (path) {
+ path.dirname = path.dirname.replace('/docs', '/'); //leaves docs folders empty.
+ }))
+ .pipe(gulp.dest(docPath + '/'));
+});
- return getDocModifyTask(elementDemo, elementDocsite, n);
- });
+gulp.task('cdn:docsite:vaadin-grid', ['cdn:docsite:bower_components'], function(done) {
+ var elementDocsite = docPath + '/vaadin-grid';
+ var elementDemo = stagingPath + '/vaadin-grid/demo/**';
+
+ return getDocModifyTask(elementDemo, elementDocsite, 'vaadin-grid');
});
function getDocModifyTask(sourceFiles, targetFolder, n) {
@@ -104,7 +111,13 @@ function getDocModifyTask(sourceFiles, targetFolder, n) {
.pipe(gulp.dest(targetFolder));
}
-gulp.task('cdn:docsite:zip', doctasks, function() {
+gulp.task('cdn:docsite:stage', ['cdn:docsite:core-elements',
+ 'cdn:docsite:core-elements-elements',
+ //separate task for vaadin-grid until it uses asciidocs
+ 'cdn:docsite:vaadin-grid',
+ 'cdn:docsite:core-elements-integrations']);
+
+gulp.task('cdn:docsite:zip', ['cdn:docsite:stage'], function() {
var src = docPath + '/**/*';
gutil.log("Creating docsite zip " + docPath + " -> " + rootZip + fileZip);
return gulp.src(src)