summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorManolo Carrasco <manolo@apache.org>2015-10-19 12:52:37 +0200
committerManolo Carrasco <manolo@apache.org>2015-10-19 12:52:37 +0200
commit1ae78d3679300ee196698b6c7a430c1ece4aea00 (patch)
tree6d30b7af8941c18efc9701eaf279a5b134d11753 /tasks
parent3c71bca3f73c0f8d5ab3cc552a7d7d09c7ab3b2f (diff)
downloadvaadin-core-1ae78d3679300ee196698b6c7a430c1ece4aea00.tar.gz
vaadin-core-1ae78d3679300ee196698b6c7a430c1ece4aea00.zip
Renaming Components in README.md
Diffstat (limited to 'tasks')
-rw-r--r--tasks/cdn.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/tasks/cdn.js b/tasks/cdn.js
index 47c552d..80771c8 100644
--- a/tasks/cdn.js
+++ b/tasks/cdn.js
@@ -5,6 +5,7 @@ var gulp = require('gulp');
var fs = require('fs-extra');
var markdown = require('gulp-markdown');
var replace = require('gulp-replace');
+var modify = require('gulp-modify');
var rsync = require('gulp-rsync');
var gutil = require('gulp-util');
var _ = require('lodash');
@@ -32,9 +33,17 @@ gulp.task('cdn:stage-bower_components', function() {
});
gulp.task('cdn:stage-vaadin-elements', function() {
- return gulp.src(['LICENSE.html', 'ga.js', 'vaadin-elements.html', 'demo/*', 'apidoc/*'], {base:"."})
- .pipe(replace('https://cdn.vaadin.com/vaadin-elements/latest/', '../../'))
- .pipe(addsrc('README.md'))
+ return gulp.src(['LICENSE.html', 'README.md', 'ga.js', 'vaadin-elements.html', 'demo/*', 'apidoc/*'], {base:"."})
+ .pipe(modify({
+ fileModifier: function(file, contents) {
+ if (/README.md/.test(file.path)) {
+ contents = contents.replace(/\/latest\//mg, '/' + version + '/')
+ } else {
+ contents.replace('https://cdn.vaadin.com/vaadin-elements/latest/', '../../');
+ }
+ return contents;
+ }
+ }))
.pipe(gulp.dest(stagingPath + "/vaadin-elements"));
});