mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge branch 'develop'
This commit is contained in:
commit
4bec9603d3
12 changed files with 133 additions and 142 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
/.nvmrc
|
||||||
/node_modules/
|
/node_modules/
|
||||||
/dist/*/
|
/dist/*/
|
||||||
/.nvmrc
|
/dist/*.min.js
|
||||||
|
/dist/paperjs.zip
|
||||||
|
|
|
@ -10,7 +10,7 @@ env:
|
||||||
matrix:
|
matrix:
|
||||||
- CXX=g++-4.9
|
- CXX=g++-4.9
|
||||||
global:
|
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:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -26,8 +26,8 @@ addons:
|
||||||
- libgif-dev
|
- libgif-dev
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- ~/.assets
|
- "~/.assets"
|
||||||
- ~/.nvm
|
- "~/.nvm"
|
||||||
- node_modules
|
- node_modules
|
||||||
install:
|
install:
|
||||||
- travis/install-assets.sh
|
- travis/install-assets.sh
|
||||||
|
@ -41,5 +41,4 @@ script:
|
||||||
- gulp minify
|
- gulp minify
|
||||||
- gulp test
|
- gulp test
|
||||||
- gulp zip
|
- gulp zip
|
||||||
after_script:
|
|
||||||
- '[ "${TRAVIS_BRANCH}" = "develop" ] && [ "${TRAVIS_NODE_VERSION}" = "stable" ] && travis/deploy-prebuilt.sh'
|
- '[ "${TRAVIS_BRANCH}" = "develop" ] && [ "${TRAVIS_NODE_VERSION}" = "stable" ] && travis/deploy-prebuilt.sh'
|
||||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,5 +1,11 @@
|
||||||
# Change Log
|
# 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`
|
## `0.11.0`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -9,9 +15,9 @@
|
||||||
context, e.g. a web browser or worker.
|
context, e.g. a web browser or worker.
|
||||||
- `paper-jsdom` is a shim module for Node.js, offering headless use with SVG
|
- `paper-jsdom` is a shim module for Node.js, offering headless use with SVG
|
||||||
importing and exporting through [jsdom](https://github.com/tmpvar/jsdom).
|
importing and exporting through [jsdom](https://github.com/tmpvar/jsdom).
|
||||||
- `paper-jsdom-canvas` is a shim module for Node.js, canvas rendering
|
- `paper-jsdom-canvas` is a shim module for Node.js, offering canvas
|
||||||
through [Node-Canvas](https://github.com/Automattic/node-canvas) as well
|
rendering through [Node-Canvas](https://github.com/Automattic/node-canvas)
|
||||||
as SVG importing and exporting through
|
as well as SVG importing and exporting through
|
||||||
[jsdom](https://github.com/tmpvar/jsdom).
|
[jsdom](https://github.com/tmpvar/jsdom).
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
6
dist/paper-core.js
vendored
6
dist/paper-core.js
vendored
|
@ -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/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* 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() {
|
getView: function() {
|
||||||
var project = this.project;
|
var project = this.project;
|
||||||
|
|
38
dist/paper-core.min.js
vendored
38
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/paper-full.js
vendored
6
dist/paper-full.js
vendored
|
@ -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/
|
* http://paperjs.org/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* 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() {
|
getView: function() {
|
||||||
var project = this.project;
|
var project = this.project;
|
||||||
|
|
39
dist/paper-full.min.js
vendored
39
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -28,17 +28,19 @@ gulp.task('docs', ['docs:local', 'build:full'], function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
Object.keys(docOptions).forEach(function(name) {
|
Object.keys(docOptions).forEach(function(name) {
|
||||||
gulp.task('docs:' + name, ['clean:docs:' + name], shell.task([
|
gulp.task('docs:' + name, ['clean:docs:' + name], function() {
|
||||||
'java -cp jsrun.jar:lib/* JsRun app/run.js -c=conf/' + name + '.conf ' +
|
var mode = docOptions[name];
|
||||||
'-D="renderMode:' + docOptions[name] + '" ' +
|
return gulp.src('src')
|
||||||
'-D="version:' + options.version + '"'
|
.pipe(shell(
|
||||||
], {
|
['java -cp jsrun.jar:lib/* JsRun app/run.js',
|
||||||
cwd: 'gulp/jsdoc'
|
' -c=conf/', name, '.conf ',
|
||||||
}));
|
' -D="renderMode:', mode, '" ',
|
||||||
|
' -D="version:', options.version, '"'].join(''),
|
||||||
|
{ cwd: 'gulp/jsdoc' })
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('clean:docs:' + name, function() {
|
gulp.task('clean:docs:' + name, function() {
|
||||||
return del([
|
return del([ 'dist/' + docOptions[name] + '/**' ]);
|
||||||
'dist/' + docOptions[name] + '/**',
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,14 +11,23 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var gulp = require('gulp'),
|
var gulp = require('gulp'),
|
||||||
git = require('gulp-git-streamed'),
|
path = require('path'),
|
||||||
jsonEditor = require('gulp-json-editor'),
|
fs = require('fs'),
|
||||||
merge = require('merge-stream'),
|
del = require('del'),
|
||||||
run = require('run-sequence'),
|
run = require('run-sequence'),
|
||||||
|
git = require('gulp-git-streamed'),
|
||||||
shell = require('gulp-shell'),
|
shell = require('gulp-shell'),
|
||||||
|
merge = require('merge-stream'),
|
||||||
|
rename = require('gulp-rename'),
|
||||||
|
jsonEditor = require('gulp-json-editor'),
|
||||||
options = require('../utils/options.js');
|
options = require('../utils/options.js');
|
||||||
|
|
||||||
var packages = ['paper-jsdom', 'paper-jsdom-canvas'],
|
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 = {
|
jsonOptions = {
|
||||||
end_with_newline: true
|
end_with_newline: true
|
||||||
};
|
};
|
||||||
|
@ -28,11 +37,12 @@ gulp.task('publish', function() {
|
||||||
throw new Error('Publishing is only allowed on the develop branch.');
|
throw new Error('Publishing is only allowed on the develop branch.');
|
||||||
}
|
}
|
||||||
return run(
|
return run(
|
||||||
'publish:version',
|
'publish:json',
|
||||||
'publish:packages',
|
|
||||||
'publish:dist',
|
'publish:dist',
|
||||||
'publish:commit',
|
'publish:commit',
|
||||||
'publish:release',
|
'publish:release',
|
||||||
|
'publish:packages',
|
||||||
|
'publish:website',
|
||||||
'publish:load'
|
'publish:load'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -41,6 +51,10 @@ gulp.task('publish:version', function() {
|
||||||
// Reset the version value since we're executing this on the develop branch,
|
// Reset the version value since we're executing this on the develop branch,
|
||||||
// but we don't wan the published version suffixed with '-develop'.
|
// but we don't wan the published version suffixed with '-develop'.
|
||||||
options.resetVersion();
|
options.resetVersion();
|
||||||
|
releaseMessage = 'Release version ' + options.version;
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('publish:json', ['publish:version'], function() {
|
||||||
return gulp.src(['package.json'])
|
return gulp.src(['package.json'])
|
||||||
.pipe(jsonEditor({
|
.pipe(jsonEditor({
|
||||||
version: options.version
|
version: options.version
|
||||||
|
@ -48,43 +62,14 @@ gulp.task('publish:version', function() {
|
||||||
.pipe(gulp.dest('.'));
|
.pipe(gulp.dest('.'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('publish:packages',
|
gulp.task('publish:dist', ['zip']);
|
||||||
packages.map(function(name) {
|
|
||||||
return 'publish:packages:' + name;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
packages.forEach(function(name) {
|
gulp.task('publish:commit', ['publish:version'], function() {
|
||||||
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;
|
|
||||||
return gulp.src('.')
|
return gulp.src('.')
|
||||||
.pipe(git.checkout('develop'))
|
.pipe(git.checkout('develop'))
|
||||||
.pipe(git.add())
|
.pipe(git.add())
|
||||||
.pipe(git.commit(message))
|
.pipe(git.commit(releaseMessage))
|
||||||
.pipe(git.tag('v' + options.version, message));
|
.pipe(git.tag('v' + options.version, releaseMessage));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('publish:release', function() {
|
gulp.task('publish:release', function() {
|
||||||
|
@ -95,6 +80,76 @@ gulp.task('publish:release', function() {
|
||||||
.pipe(shell('npm publish'));
|
.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() {
|
gulp.task('publish:load', ['load'], function() {
|
||||||
return gulp.src('dist')
|
return gulp.src('dist')
|
||||||
.pipe(git.checkout('develop'))
|
.pipe(git.checkout('develop'))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper",
|
"name": "paper",
|
||||||
"version": "0.11.0",
|
"version": "0.11.1",
|
||||||
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
"description": "The Swiss Army Knife of Vector Graphics Scripting",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "http://paperjs.org",
|
"homepage": "http://paperjs.org",
|
||||||
|
@ -72,6 +72,10 @@
|
||||||
"straps": "^2.1.0"
|
"straps": "^2.1.0"
|
||||||
},
|
},
|
||||||
"browser": {
|
"browser": {
|
||||||
|
"canvas": false,
|
||||||
|
"jsdom": false,
|
||||||
|
"jsdom/lib/jsdom/living/generated/utils": false,
|
||||||
|
"source-map-support": false,
|
||||||
"./dist/node/self.js": false,
|
"./dist/node/self.js": false,
|
||||||
"./dist/node/extend.js": false
|
"./dist/node/extend.js": false
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
// The paper.js version.
|
// The paper.js version.
|
||||||
// NOTE: Adjust value here before calling `gulp publish`, which then updates and
|
// NOTE: Adjust value here before calling `gulp publish`, which then updates and
|
||||||
// publishes the various JSON package files automatically.
|
// 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.
|
// If this file is loaded in the browser, we're in load.js mode.
|
||||||
var load = typeof window === 'object';
|
var load = typeof window === 'object';
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# travis encrypt GH_TOKEN=<TOKEN> --add
|
# travis encrypt GH_TOKEN=<TOKEN> --add
|
||||||
git config user.name "Paper.js Bot"
|
git config user.name "Paper.js Bot"
|
||||||
git config user.email "bot@paperjs.org"
|
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
|
echo "https://${GH_TOKEN}:@github.com" > .git/credentials
|
||||||
|
|
||||||
# It took ages to figures this one out:
|
# It took ages to figures this one out:
|
||||||
|
|
Loading…
Reference in a new issue