Merge branch 'develop'

This commit is contained in:
Jürg Lehni 2017-04-20 18:43:21 +02:00
commit 4bec9603d3
12 changed files with 133 additions and 142 deletions

4
.gitignore vendored
View file

@ -1,3 +1,5 @@
/.nvmrc
/node_modules/
/dist/*/
/.nvmrc
/dist/*.min.js
/dist/paperjs.zip

View file

@ -10,7 +10,7 @@ env:
matrix:
- CXX=g++-4.9
global:
- secure: QD8wgggmlF0PPOSdQ84JLO9quLMlTDXu3Cg0+UM9yFSyih2ukL/XGn5wxR3B3XmaHfzRqxtrfhjMX6LT7DKFsriolhNVu0kER4zGyrKWK5irxAy2veosyj8qs/R1pXh9qnItlgXrz0fJwpH9o/08q8X+ZjXb0veZ34EMODLbV5zBJXoaHVC6WN62GzInAEEfdB0AEacb44sDIdK++1ujcTFLGnc+LJw8Ck2C/eOWwRhJyiNUrHHTQV3KaM0YtHz+DCz5InC9vWl+BG656AOU5C6PMTvnZ1M3CGfjmXydZoBbDvCQIcB5ylf17tXGoJKevHnmLWm6U3fPVwUwiPiKvisxyNShZw4BEDS7m1b799GnzGOiYsi37aH3G+iAORg1QVqoCAK/yQ77MkkA6a3tlLVHRaInVA6QlFxlbqc8WNlx+fa8lo4L7Y9KPGfr1Bpix/kHQV5JCzKS16Zc7wblTrOvIR/qb8qPfLoxhXi5fUZ3eRuXgR699X1IHJ1LlhkOoBfSiWl88qba01FBLrYSCPeVGb6/N91OFpIlq6eORnzBbc4mtoJSYttvZ45Hu3M5V0KDrGIHr7kNyPThdKr7PVaMXHLCpNrnmBSaxVCU5uhb8Ae3bnLAq/aBxHWZNA8cQ43/s6rS7QqOVJfquXNFYa6V9/QjbU3sJyqIgRzMkAM=
- secure: o1fJ/suqcL0aX6PiOmip602dAM6Q6O5oU/BDhSueUOnYknbzWfWGOdsoMun0UYhvvdcXU4sHGH+wm0VeXa2igaxryx36uMxPsXB3mO4sATo/QlWX/r3wLCg2CViXhykE5l2gP45OHh5DJgKWs51cwGLDZ9y9JHlXSP/xIGBNkMGVC7qvyhTfEb0EVvirn9b7Kt8fmD8KYgNDrsmcR3d42f4jitt4Di9LsRyOG+SCXZfI3u831tHo1sgZuGK2rxx2SdEclIblEUCkFHLp0HPjq1+032Cg5D7HNloSCPfoSwcY+rOWHubNXhmXgZHFeSkaVglkdWlDE3NiyjNlYwc4m9zqfCip8jw/jUeSfFVtruncEumGLLBxE/aMBQjAQLTq24juabm3qZNgrNCFeFo+XNyx2Oz1jllGve6Vuu8Qg0wFqE+qlZKnxNbu5/3IOIawOE1uhaOG8oSuvlpQuNrHFIMEfzh2UKPiUHbElUDyoTzHlrhQr7ZSPWPJax4uIPOTscpK4Yks7FBS4I0Vnuhw41f/bVR0kLE9jNAQoUpp47ma9O2Sw9fhOwEiopVrADzARUiy0eNeLx8F2F73L0wyPBOtEL1cfCr5oY+yZ5ZfDYb/L8/GIlbMnljYxVbXesmwd8RFi8X2HUNnEmusjih9oWazVuZpiFfUO0oeu15JTBg=
addons:
apt:
sources:
@ -26,8 +26,8 @@ addons:
- libgif-dev
cache:
directories:
- ~/.assets
- ~/.nvm
- "~/.assets"
- "~/.nvm"
- node_modules
install:
- travis/install-assets.sh
@ -41,5 +41,4 @@ script:
- gulp minify
- gulp test
- gulp zip
after_script:
- '[ "${TRAVIS_BRANCH}" = "develop" ] && [ "${TRAVIS_NODE_VERSION}" = "stable" ] && travis/deploy-prebuilt.sh'

View file

@ -1,5 +1,11 @@
# Change Log
## `0.11.1`
### Fixed
- Bring back deactivation of Node.js modules on browsers. This has most probably
broken Webpack bundling in `0.11.0`.
## `0.11.0`
### Changed
@ -9,9 +15,9 @@
context, e.g. a web browser or worker.
- `paper-jsdom` is a shim module for Node.js, offering headless use with SVG
importing and exporting through [jsdom](https://github.com/tmpvar/jsdom).
- `paper-jsdom-canvas` is a shim module for Node.js, canvas rendering
through [Node-Canvas](https://github.com/Automattic/node-canvas) as well
as SVG importing and exporting through
- `paper-jsdom-canvas` is a shim module for Node.js, offering canvas
rendering through [Node-Canvas](https://github.com/Automattic/node-canvas)
as well as SVG importing and exporting through
[jsdom](https://github.com/tmpvar/jsdom).
### Added

6
dist/paper-core.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Paper.js v0.11.0 - The Swiss Army Knife of Vector Graphics Scripting.
* Paper.js v0.11.1 - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Wed Apr 19 20:32:12 2017 +0200
* Date: Thu Apr 20 18:16:21 2017 +0200
*
***
*
@ -769,7 +769,7 @@ var PaperScope = Base.extend({
}
},
version: "0.11.0",
version: "0.11.1",
getView: function() {
var project = this.project;

File diff suppressed because one or more lines are too long

6
dist/paper-full.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Paper.js v0.11.0 - The Swiss Army Knife of Vector Graphics Scripting.
* Paper.js v0.11.1 - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Wed Apr 19 20:32:12 2017 +0200
* Date: Thu Apr 20 18:16:21 2017 +0200
*
***
*
@ -769,7 +769,7 @@ var PaperScope = Base.extend({
}
},
version: "0.11.0",
version: "0.11.1",
getView: function() {
var project = this.project;

File diff suppressed because one or more lines are too long

View file

@ -28,17 +28,19 @@ gulp.task('docs', ['docs:local', 'build:full'], function() {
});
Object.keys(docOptions).forEach(function(name) {
gulp.task('docs:' + name, ['clean:docs:' + name], shell.task([
'java -cp jsrun.jar:lib/* JsRun app/run.js -c=conf/' + name + '.conf ' +
'-D="renderMode:' + docOptions[name] + '" ' +
'-D="version:' + options.version + '"'
], {
cwd: 'gulp/jsdoc'
}));
gulp.task('docs:' + name, ['clean:docs:' + name], function() {
var mode = docOptions[name];
return gulp.src('src')
.pipe(shell(
['java -cp jsrun.jar:lib/* JsRun app/run.js',
' -c=conf/', name, '.conf ',
' -D="renderMode:', mode, '" ',
' -D="version:', options.version, '"'].join(''),
{ cwd: 'gulp/jsdoc' })
)
});
gulp.task('clean:docs:' + name, function() {
return del([
'dist/' + docOptions[name] + '/**',
]);
return del([ 'dist/' + docOptions[name] + '/**' ]);
});
});

View file

@ -11,14 +11,23 @@
*/
var gulp = require('gulp'),
git = require('gulp-git-streamed'),
jsonEditor = require('gulp-json-editor'),
merge = require('merge-stream'),
path = require('path'),
fs = require('fs'),
del = require('del'),
run = require('run-sequence'),
git = require('gulp-git-streamed'),
shell = require('gulp-shell'),
merge = require('merge-stream'),
rename = require('gulp-rename'),
jsonEditor = require('gulp-json-editor'),
options = require('../utils/options.js');
var packages = ['paper-jsdom', 'paper-jsdom-canvas'],
sitePath = path.resolve('../paperjs.org'),
referencePath = sitePath + '/content/08-Reference',
downloadPath = sitePath + '/content/11-Download',
assetPath = sitePath + '/assets/js',
releaseMessage = null,
jsonOptions = {
end_with_newline: true
};
@ -28,11 +37,12 @@ gulp.task('publish', function() {
throw new Error('Publishing is only allowed on the develop branch.');
}
return run(
'publish:version',
'publish:packages',
'publish:json',
'publish:dist',
'publish:commit',
'publish:release',
'publish:packages',
'publish:website',
'publish:load'
);
});
@ -41,6 +51,10 @@ 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();
releaseMessage = 'Release version ' + options.version;
});
gulp.task('publish:json', ['publish:version'], function() {
return gulp.src(['package.json'])
.pipe(jsonEditor({
version: options.version
@ -48,43 +62,14 @@ gulp.task('publish:version', function() {
.pipe(gulp.dest('.'));
});
gulp.task('publish:packages',
packages.map(function(name) {
return 'publish:packages:' + name;
})
);
gulp.task('publish:dist', ['zip']);
packages.forEach(function(name) {
gulp.task('publish:packages:' + name, function() {
options.resetVersion(); // See 'publish:version'
var message = 'Release version ' + options.version,
path = 'packages/' + name,
opts = { cwd: path };
gulp.src(['package.json'], opts)
.pipe(jsonEditor({
version: options.version,
dependencies: {
paper: options.version
}
}, jsonOptions))
.pipe(gulp.dest(path))
.pipe(git.add(opts))
.pipe(git.commit(message, opts))
.pipe(git.tag('v' + options.version, message, opts))
.pipe(git.push('origin', 'master', { args: '--tags', cwd: path }))
.pipe(shell('npm publish', opts));
});
});
gulp.task('publish:dist', ['dist']);
gulp.task('publish:commit', function() {
var message = 'Release version ' + options.version;
gulp.task('publish:commit', ['publish:version'], function() {
return gulp.src('.')
.pipe(git.checkout('develop'))
.pipe(git.add())
.pipe(git.commit(message))
.pipe(git.tag('v' + options.version, message));
.pipe(git.commit(releaseMessage))
.pipe(git.tag('v' + options.version, releaseMessage));
});
gulp.task('publish:release', function() {
@ -95,6 +80,76 @@ gulp.task('publish:release', function() {
.pipe(shell('npm publish'));
});
gulp.task('publish:packages',
packages.map(function(name) {
return 'publish:packages:' + name;
})
);
packages.forEach(function(name) {
gulp.task('publish:packages:' + name, ['publish:version'], function() {
var path = 'packages/' + name,
opts = { cwd: path };
gulp.src(['package.json'], opts)
.pipe(jsonEditor({
version: options.version,
dependencies: {
paper: options.version
}
}, jsonOptions))
.pipe(gulp.dest(path))
.pipe(git.add(opts))
.pipe(git.commit(releaseMessage, opts))
.pipe(git.tag('v' + options.version, releaseMessage, opts))
.pipe(git.push('origin', 'master', { args: '--tags', cwd: path }))
.pipe(shell('npm publish', opts));
});
});
gulp.task('publish:website', function() {
if (fs.lstatSync(sitePath).isDirectory()) {
return run(
'publish:website:build',
'publish:website:push'
);
}
});
gulp.task('publish:website:build',
['publish:website:docs', 'publish:website:zip', 'publish:website:lib']);
gulp.task('publish:website:docs:clean', function() {
return del([ referencePath + '/*' ], { force: true });
});
gulp.task('publish:website:docs',
['publish:version', 'publish:website:docs:clean', 'docs:server'],
function() {
return gulp.src('dist/serverdocs/**')
.pipe(gulp.dest(referencePath));
});
gulp.task('publish:website:zip', ['publish:version'], function() {
return gulp.src('dist/paperjs.zip')
.pipe(rename({ suffix: '-v' + options.version }))
.pipe(gulp.dest(downloadPath));
});
gulp.task('publish:website:lib', ['publish:version'], function() {
return gulp.src('dist/paper-full.js')
.pipe(rename({ basename: 'paper' }))
.pipe(gulp.dest(assetPath));
});
gulp.task('publish:website:push', ['publish:version'], function() {
var opts = { cwd: sitePath };
return gulp.src(sitePath)
.pipe(git.add(opts))
.pipe(git.commit(releaseMessage, opts))
.pipe(git.tag('v' + options.version, releaseMessage, opts))
.pipe(git.push('origin', 'master', { args: '--tags', cwd: sitePath }));
});
gulp.task('publish:load', ['load'], function() {
return gulp.src('dist')
.pipe(git.checkout('develop'))

View file

@ -1,6 +1,6 @@
{
"name": "paper",
"version": "0.11.0",
"version": "0.11.1",
"description": "The Swiss Army Knife of Vector Graphics Scripting",
"license": "MIT",
"homepage": "http://paperjs.org",
@ -72,6 +72,10 @@
"straps": "^2.1.0"
},
"browser": {
"canvas": false,
"jsdom": false,
"jsdom/lib/jsdom/living/generated/utils": false,
"source-map-support": false,
"./dist/node/self.js": false,
"./dist/node/extend.js": false
},

View file

@ -17,7 +17,7 @@
// The paper.js version.
// NOTE: Adjust value here before calling `gulp publish`, which then updates and
// publishes the various JSON package files automatically.
var version = '0.11.0';
var version = '0.11.1';
// If this file is loaded in the browser, we're in load.js mode.
var load = typeof window === 'object';

View file

@ -16,7 +16,7 @@
# travis encrypt GH_TOKEN=<TOKEN> --add
git config user.name "Paper.js Bot"
git config user.email "bot@paperjs.org"
git config credential.helper "store --file=.git/credentials"
git config credential.helper "store --file .git/credentials"
echo "https://${GH_TOKEN}:@github.com" > .git/credentials
# It took ages to figures this one out: