Introduce paper-jsdom and paper-jsdom-canvas submodules.

Relates to #1252
This commit is contained in:
Jürg Lehni 2017-04-19 19:53:39 +02:00
parent 7dea96c6f2
commit 2bac4e71e0
8 changed files with 39 additions and 13 deletions

View file

@ -11,18 +11,23 @@
*/
var gulp = require('gulp'),
bump = require('gulp-bump'),
jsonEditor = require('gulp-json-editor'),
git = require('gulp-git-streamed'),
run = require('run-sequence'),
shell = require('gulp-shell'),
options = require('../utils/options.js');
var jsonOptions = {
end_with_newline: true
};
gulp.task('publish', function() {
if (options.branch !== 'develop') {
throw new Error('Publishing is only allowed on the develop branch.');
}
return run(
'publish:version',
'publish:packages',
'publish:dist',
'publish:commit',
'publish:release',
@ -34,11 +39,25 @@ gulp.task('publish:version', function() {
// Reset the version value since we're executing this on the develop branch,
// but we don't wan the published version suffixed with '-develop'.
options.resetVersion();
return gulp.src([ 'package.json' ])
.pipe(bump({ version: options.version }))
return gulp.src(['package.json'])
.pipe(jsonEditor({
version: options.version
}, jsonOptions))
.pipe(gulp.dest('.'));
});
gulp.task('publish:packages', function() {
options.resetVersion(); // See 'publish:version'
return gulp.src(['packages/**/*.json'])
.pipe(jsonEditor({
version: options.version,
dependencies: {
paper: options.version
}
}, jsonOptions))
.pipe(gulp.dest('packages'));
});
gulp.task('publish:dist', ['dist']);
gulp.task('publish:commit', function() {