});
});
-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']);
}, [['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();
});
});
-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;
}));
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);
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',
.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
// 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
.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));
});
});
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');
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);
}
});
});
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'));
});
// 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'))
});
});
-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;
}));
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;
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);