diff options
author | Manolo Carrasco <manolo@apache.org> | 2015-10-19 09:42:52 +0200 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2015-10-19 09:42:52 +0200 |
commit | 4739783afc01fb0a2291402bed28233fd8d6496d (patch) | |
tree | 0c2cdd6edcef88fe3d53de3ac9f9c6788b6d4b7e /tasks | |
parent | e1f8b8410a85693c92c0d25614b5ffc1b1a5fe08 (diff) | |
download | vaadin-core-4739783afc01fb0a2291402bed28233fd8d6496d.tar.gz vaadin-core-4739783afc01fb0a2291402bed28233fd8d6496d.zip |
Renaming tasks components -> elements
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/cdn.js | 20 | ||||
-rw-r--r-- | tasks/config.js | 2 | ||||
-rw-r--r-- | tasks/docsite.js | 20 | ||||
-rw-r--r-- | tasks/zip.js | 20 |
4 files changed, 31 insertions, 31 deletions
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(/^.*<script.*?\/webcomponents.*\.js[\"'].*?<\/script>\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(/^.*<script.*?ga\.js[\"'].*?<\/script>\s*?\n?/img, '')) // Adjust bowerComponents variable in common.html @@ -91,7 +91,7 @@ config.components.forEach(function (n) { .pipe(replace(/^.*<link.*demo.css.*\n/im, '')) // Remove table of contents .pipe(replace(/^.*table-of-contents.html.*\n/im, '')) - .pipe(gulp.dest(componentDocsite)); + .pipe(gulp.dest(elementDocsite)); }); }); diff --git a/tasks/zip.js b/tasks/zip.js index f649d98..d3e6945 100644 --- a/tasks/zip.js +++ b/tasks/zip.js @@ -14,7 +14,7 @@ var zip = require('gulp-zip'); var stagingPath = config.paths.staging.zip; var version = config.version; var host = config.zipHost; -var filename = 'vaadin-components-' + version + '.zip'; +var filename = 'vaadin-elements-' + version + '.zip'; var majorMinorVersion = version.replace(/(\d+\.\d+)(\.|-)(.*)/, '$1'); @@ -61,11 +61,11 @@ gulp.task('zip:update-references', ['zip:upload'], function(done) { common.checkArguments(['zipUsername', 'zipDestination']); if(args.release) { - ssh("sed -i '1i components/" + majorMinorVersion + '/' + version + "' " + args.zipDestination + 'VERSIONS', done); + ssh("sed -i '1i elements/" + majorMinorVersion + '/' + version + "' " + args.zipDestination + 'VERSIONS', done); } else if(args.preRelease) { - ssh("sed -i '1i components/" + majorMinorVersion + '/' + version + "' " + args.zipDestination + 'PRERELEASES', done); + ssh("sed -i '1i elements/" + majorMinorVersion + '/' + version + "' " + args.zipDestination + 'PRERELEASES', done); } else { - ssh('echo components/' + majorMinorVersion + '/' + version + ' > ' + 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); |