From: Manolo Carrasco Date: Mon, 19 Oct 2015 07:42:52 +0000 (+0200) Subject: Renaming tasks components -> elements X-Git-Tag: 0.3.0-beta11~3^2~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4739783afc01fb0a2291402bed28233fd8d6496d;p=vaadin-core.git Renaming tasks components -> elements --- diff --git a/tasks/cdn.js b/tasks/cdn.js index d1a8526..47c552d 100644 --- a/tasks/cdn.js +++ b/tasks/cdn.js @@ -31,14 +31,14 @@ gulp.task('cdn:stage-bower_components', function() { }); }); -gulp.task('cdn:stage-vaadin-components', function() { - return gulp.src(['LICENSE.html', 'ga.js', 'vaadin-components.html', 'demo/*', 'apidoc/*'], {base:"."}) - .pipe(replace('https://cdn.vaadin.com/vaadin-components/latest/', '../../')) +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')) - .pipe(gulp.dest(stagingPath + "/vaadin-components")); + .pipe(gulp.dest(stagingPath + "/vaadin-elements")); }); -gulp.task('stage:cdn', [ 'clean:cdn', 'cdn:stage-bower_components', 'cdn:stage-vaadin-components' ]); +gulp.task('stage:cdn', [ 'clean:cdn', 'cdn:stage-bower_components', 'cdn:stage-vaadin-elements' ]); gulp.task('upload:cdn', ['stage:cdn'], function() { common.checkArguments(['cdnUsername', 'cdnDestination']); @@ -87,13 +87,13 @@ gulp.task('cdn-test:install-dependencies', function() { }, [['web-component-tester#2.2.6']]); }); -config.components.forEach(function (n) { +config.elements.forEach(function (n) { gulp.task('cdn-test:stage:' + n, ['cdn-test:clean', 'cdn-test:install-dependencies'], function(done) { fs.mkdirsSync(testPath); return git.clone('https://github.com/vaadin/' + n, {cwd: testPath}, function (err) { gulp.src(testPath + '/' + n + '/test/**') - .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/(bower_components|node_modules)\/(.*?)\//mg, '$1=$2https://cdn.vaadin.com/vaadin-components/'+ version + '/$5/')) - .pipe(replace(/(src|href)=("|')(.*?)\.\.\//mg, '$1=$2https://cdn.vaadin.com/vaadin-components/'+ version +'/' + n + '/')) + .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/(bower_components|node_modules)\/(.*?)\//mg, '$1=$2https://cdn.vaadin.com/vaadin-elements/'+ version + '/$5/')) + .pipe(replace(/(src|href)=("|')(.*?)\.\.\//mg, '$1=$2https://cdn.vaadin.com/vaadin-elements/'+ version +'/' + n + '/')) .pipe(replace(/(src|href)=("|')(.*?)(web-component-tester)\//mg, '$1=$2../../web-component-tester/')) .pipe(gulp.dest(testPath + '/' + n + '/test/')); done(); @@ -101,7 +101,7 @@ config.components.forEach(function (n) { }); }); -gulp.task('cdn-test:stage', _.map(config.components, function (n) { +gulp.task('cdn-test:stage', _.map(config.elements, function (n) { return 'cdn-test:stage:' + n; })); @@ -115,7 +115,7 @@ gulp.task('verify:cdn', ['cdn-test:stage'], function(done) { common.testSauce( ['target/cdn/' + version + '/test/**/index.html'], ['Windows 7/firefox@36'], - 'vaadin-components / cdn.vaadin.com / ' + version, + 'vaadin-elements / cdn.vaadin.com / ' + version, function(err) { common.autoRevert(err, function() { gutil.log('Deleting folder ' + args.cdnDestination + version); diff --git a/tasks/config.js b/tasks/config.js index 83560f0..3b618ea 100644 --- a/tasks/config.js +++ b/tasks/config.js @@ -4,7 +4,7 @@ var fs = require('fs'); var userhome = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE; module.exports = { - components: ['vaadin-grid'], + elements: ['vaadin-grid'], version: args.version || 'master', permalink: args.version ? 'latest' : '', toolsHost: args.toolsHostname || 'tools.vaadin.com', diff --git a/tasks/docsite.js b/tasks/docsite.js index b5f9cad..2526f8d 100644 --- a/tasks/docsite.js +++ b/tasks/docsite.js @@ -41,22 +41,22 @@ gulp.task('cdn:docsite:bower_components', ['cdn:stage-bower_components'], functi .pipe(gulp.dest(docPath + '/bower_components')); }); -gulp.task('cdn:docsite:components', function() { +gulp.task('cdn:docsite:elements', function() { return gulp.src('doc/*') .pipe(gulp.dest(docPath)); }); -var doctasks = ['cdn:docsite:components']; -config.components.forEach(function (n) { +var doctasks = ['cdn:docsite:elements']; +config.elements.forEach(function (n) { var task = 'cdn:docsite:' + n; doctasks.push(task); gulp.task(task, ['cdn:docsite:bower_components'], function(done) { - var componentDocsite = docPath + '/' + n; - var componentDemo = stagingPath + '/' + n + '/demo/**'; + var elementDocsite = docPath + '/' + n; + var elementDemo = stagingPath + '/' + n + '/demo/**'; - gutil.log('Generating site documentation from ' + componentDemo + ' into ' + componentDocsite); - fs.mkdirsSync(componentDocsite); - return gulp.src([componentDemo, '!**/*-embed.html']) + gutil.log('Generating site documentation from ' + elementDemo + ' into ' + elementDocsite); + fs.mkdirsSync(elementDocsite); + return gulp.src([elementDemo, '!**/*-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 @@ -78,7 +78,7 @@ config.components.forEach(function (n) { // Remove webcomponents polyfill since it's added at top of the site .pipe(replace(/^.*\s*?\n?/img, '')) // embed files are displayed as iframe, we don't remove above fragments like body or polyfill - .pipe(addsrc(componentDemo + '/*-embed.html')) + .pipe(addsrc(elementDemo + '/*-embed.html')) // Remove Analytics .pipe(replace(/^.*\s*?\n?/img, '')) // Adjust bowerComponents variable in common.html @@ -91,7 +91,7 @@ config.components.forEach(function (n) { .pipe(replace(/^.* ' + args.zipDestination + 'SNAPSHOT', done); + ssh('echo elements/' + majorMinorVersion + '/' + version + ' > ' + args.zipDestination + 'SNAPSHOT', done); } }); @@ -76,7 +76,7 @@ gulp.task('zip-test:clean', function() { }); gulp.task('zip-test:download', ['zip-test:clean'], function() { - var url = args.zipUrl || 'https://vaadin.com/download/components'; + var url = args.zipUrl || 'https://vaadin.com/download/elements'; return download(url + '/' + majorMinorVersion +'/' + version + '/' + filename) .pipe(gulp.dest(stagingPath + '/test')); }); @@ -97,9 +97,9 @@ gulp.task('zip-test:install-wct', ['zip-test:download'], function() { // TODO: Haven't been fixed for the new project structure. Once the tests are in use, // apply similar changes as in cdn.js -config.components.forEach(function (n) { +config.elements.forEach(function (n) { gulp.task('zip-test:stage:' + n, ['zip-test:download'], function() { - return gulp.src('vaadin-components/' + n + '/test/**/*') + return gulp.src('vaadin-elements/' + n + '/test/**/*') .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/\.\.\/\.\.\/(bower_components|node_modules)\//mg, '$1=$2../../$3')) .pipe(replace(/(src|href)=("|')(.*?)\.\.\/\.\.\/\.\.\/(bower_components|node_modules)\//mg, '$1=$2../../$3')) .pipe(replace(/(src|href)=("|')(.*?)\.\.\/(vaadin-)/mg, '$1=$2../../' + n + '/$3$4')) @@ -107,7 +107,7 @@ config.components.forEach(function (n) { }); }); -gulp.task('zip-test:stage', _.map(config.components, function(n) { +gulp.task('zip-test:stage', _.map(config.elements, function(n) { return 'zip-test:stage:'+n; })); @@ -119,7 +119,7 @@ gulp.task('verify:zip', ['zip-test:unzip', 'zip-test:install-wct', 'zip-test:sta common.testSauce( ['target/zip/test/test/**/index.html'], ['Windows 7/internet explorer@11'], - 'vaadin-components / vaadin.com / ' + version, + 'vaadin-elements / vaadin.com / ' + version, function(err) { common.autoRevert(err, function() { var path = args.zipDestination + majorMinorVersion + '/' + version; @@ -127,7 +127,7 @@ gulp.task('verify:zip', ['zip-test:unzip', 'zip-test:install-wct', 'zip-test:sta gutil.log('Deleting package ' + path); // remove the version from VERSIONS - ssh('grep -v "components/' + majorMinorVersion + '/' + version + '" ' + + ssh('grep -v "elements/' + majorMinorVersion + '/' + version + '" ' + args.zipDestination + 'VERSIONS > temp && mv temp ' + args.zipDestination + 'VERSIONS', function(error) { if(error) done(error);