},
"resolutions": {
"polymer": "v1.1.1"
+ },
+ "masterOverrides": {
+ "version": "master",
+ "dependencies": {
+ "vaadin-grid": "vaadin/vaadin-grid#master",
+ "vaadin-combo-box": "vaadin/vaadin-combo-box#master",
+ "vaadin-icons": "vaadin/vaadin-icons#master",
+ "vaadin-date-picker": "vaadin/vaadin-date-picker#master",
+ "vaadin-upload": "vaadin/vaadin-upload#master",
+ "vaadin-split-layout": "vaadin/vaadin-split-layout#master"
+ }
}
}
var common = require('./common');
var gulp = require('gulp');
var fs = require('fs-extra');
+var path = require('path');
var modify = require('gulp-modify');
var rsync = require('gulp-rsync');
var gutil = require('gulp-util');
var version = config.version;
var host = config.toolsHost;
var permalink = config.permalink;
-var stagingPath = stagingBasePath + '/' + version;
-var testPath = process.cwd() + '/' + stagingPath + '/test';
+var stagingPath = path.join(process.cwd(), stagingBasePath, version);
+var masterBowerPath = config.paths.staging.bower;
gulp.task('clean:cdn', function() {
fs.removeSync(stagingBasePath);
});
-gulp.task('cdn:stage-bower_components', function() {
+gulp.task('clean:bower', function() {
+ fs.removeSync(masterBowerPath);
+});
+
+gulp.task('cdn:stage-bower.json', function() {
+ // Load the bower.json, assign overrides and write back to disk.
+ let bowerJson = JSON.parse(fs.readFileSync('./bower.json', 'utf-8'));
+ bowerJson = Object.assign(bowerJson, bowerJson.masterOverrides);
+ delete bowerJson.masterOverrides;
+
+ fs.mkdirSync(masterBowerPath);
+ fs.writeFileSync(masterBowerPath + '/bower.json', JSON.stringify(bowerJson, null, ' '));
+ gutil.log('Created ' + masterBowerPath + '/bower.json with overrides applied.');
+});
+
+gulp.task('cdn:stage-bower_components', ['cdn:stage-bower.json'], function() {
+ const bowerJsonPath = path.join(process.cwd(), (version === 'master' ? masterBowerPath : ''));
return bower({
directory: stagingPath,
+ cwd: bowerJsonPath,
forceLatest: true,
cmd: 'install'
});
return contents;
}
}))
- .pipe(gulp.dest(stagingPath + "/vaadin-core-elements"));
+ .pipe(gulp.dest(stagingPath + '/vaadin-core-elements'));
});
-gulp.task('stage:cdn', ['clean:cdn', 'cdn:stage-bower_components', 'cdn:stage-vaadin-core-elements']);
+gulp.task('stage:cdn', ['clean:cdn', 'clean:bower', 'cdn:stage-bower_components', 'cdn:stage-vaadin-core-elements']);
gulp.task('upload:cdn', ['stage:cdn'], function() {
common.checkArguments(['cdnUsername', 'cdnDestination']);
var userhome = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
module.exports = {
- coreElements: ['vaadin-grid', 'vaadin-combo-box', 'vaadin-date-picker', 'vaadin-upload', 'vaadin-icons'],
version: args.version || 'master',
permalink: args.version ? 'latest' : '',
toolsHost: args.toolsHostname || 'tools.vaadin.com',
var modify = require('gulp-modify');
var rootZip = 'target/';
var fileZip = 'docsite.zip';
+var bowerJson = require('../bower.json');
gulp.task('cdn:docsite:clean', function() {
fs.removeSync(docPath);
});
gulp.task('cdn:docsite:core-elements-elements', ['cdn:docsite:bower_components'], function() {
- var docsPaths = config.coreElements.map(function(c) {
- return stagingPath + '/' + c + '/docs/**';
- });
+ var docsPaths = Object.keys(bowerJson.dependencies).map(function(c) {
+ return stagingPath + '/' + c + '/docs/**';
+ });
return gulp.src(docsPaths, {base: stagingPath})
.pipe(rename(function (path) {