summaryrefslogtreecommitdiffstats
path: root/tasks/docsite.js
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-10-01 14:24:14 +0200
committerManolo Carrasco <manolo@apache.org>2015-10-01 14:24:14 +0200
commitacdfc069443032f5f4c4aca18b9f0a33e8fec8d3 (patch)
tree7f57afb1746f6896d62ec1c968d5b4a12aab1c60 /tasks/docsite.js
parent60e7b3c0273e7b332c3bcab84636f5be1b823089 (diff)
downloadvaadin-core-acdfc069443032f5f4c4aca18b9f0a33e8fec8d3.tar.gz
vaadin-core-acdfc069443032f5f4c4aca18b9f0a33e8fec8d3.zip
Adding dummy index file, and doc folder thought for introduction etc
Diffstat (limited to 'tasks/docsite.js')
-rw-r--r--tasks/docsite.js23
1 files changed, 14 insertions, 9 deletions
diff --git a/tasks/docsite.js b/tasks/docsite.js
index decede9..771cbf7 100644
--- a/tasks/docsite.js
+++ b/tasks/docsite.js
@@ -20,7 +20,6 @@ var modify = require('gulp-modify');
var rootZip = 'target/';
var fileZip = 'docsite.zip'
-
gulp.task('cdn:docsite:clean', function() {
fs.removeSync(docPath);
fs.removeSync(rootZip + fileZip);
@@ -32,16 +31,22 @@ gulp.task('cdn:docsite:bower_components', ['cdn:stage-bower_components'], functi
.pipe(gulp.dest(docPath + '/bower_components'));
});
-var doctasks = [];
+gulp.task('cdn:docsite:components', function() {
+ return gulp.src('doc/*')
+ .pipe(gulp.dest(docPath));
+});
+
+var doctasks = ['cdn:docsite:components'];
config.components.forEach(function (n) {
var task = 'cdn:docsite:' + n;
doctasks.push(task);
gulp.task(task, ['cdn:docsite:bower_components'], function(done) {
- var componentDoc = docPath + '/' + n;
- var componentOrg = stagingPath + '/' + n + '/demo/**';
- gutil.log('Generating site documentation from ' + componentOrg + ' into ' + componentDoc);
- fs.mkdirsSync(componentDoc);
- return gulp.src([componentOrg, '!**/*-embed.html'])
+ var componentDocsite = docPath + '/' + n;
+ var componentDemo = stagingPath + '/' + n + '/demo/**';
+
+ gutil.log('Generating site documentation from ' + componentDemo + ' into ' + componentDocsite);
+ fs.mkdirsSync(componentDocsite);
+ return gulp.src([componentDemo, '!**/*-embed.html'])
// Remove bad tags
.pipe(replace(/^.*<(!doctype|\/?html|\/?head|\/?body|meta|title).*>.*\n/img, ''))
// Uncomment metainfo, and enclose all the example in {% raw %} ... {% endraw %} to avoid liquid conflicts
@@ -61,7 +66,7 @@ config.components.forEach(function (n) {
return '<h' + $1 + ' id="' + id + '">' + $2 + $3;
}))
// embed files are displayed as iframe, we don't remove above fragments like body
- .pipe(addsrc(componentOrg + '/*-embed.html'))
+ .pipe(addsrc(componentDemo + '/*-embed.html'))
// Remove Analytics
.pipe(replace(/^.*<script.*?ga\.js[\"'].*?<\/script>\s*?\n?/img, ''))
// Adjust location of the current component in bower_components (..)
@@ -69,7 +74,7 @@ config.components.forEach(function (n) {
// Adjust location of dependencies in bower_components (../..)
.pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\//mg, '$1=$2../bower_components/'))
- .pipe(gulp.dest(componentDoc));
+ .pipe(gulp.dest(componentDocsite));
});
});