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

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/node_modules/
/dist/*/
/.nvmrc

6
.gitmodules vendored
View file

@ -1,3 +1,9 @@
[submodule "jsdoc"]
path = gulp/jsdoc
url = https://github.com/paperjs/jsdoc.git
[submodule "paper-jsdom"]
path = packages/paper-jsdom
url = https://github.com/paperjs/paper-jsdom.git
[submodule "paper-jsdom-canvas"]
path = packages/paper-jsdom-canvas
url = https://github.com/paperjs/paper-jsdom-canvas.git

View file

@ -18,6 +18,7 @@
"gulpfile.js",
"gulp",
"node_modules",
"packages",
"projects",
"src",
"test",

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',
@ -35,10 +40,24 @@ gulp.task('publish:version', function() {
// but we don't wan the published version suffixed with '-develop'.
options.resetVersion();
return gulp.src(['package.json'])
.pipe(bump({ version: options.version }))
.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() {

View file

@ -36,19 +36,15 @@
"engines": {
"node": ">=4.0.0 <8.0.0"
},
"optionalDependencies": {
"canvas": "^1.3.5",
"jsdom": "^9.4.0",
"source-map-support": "^0.4.0"
},
"devDependencies": {
"acorn": "~0.5.0",
"canvas": "^1.3.5",
"del": "^2.2.1",
"gulp": "^3.9.1",
"gulp-bump": "^2.2.0",
"gulp-cached": "^1.1.0",
"gulp-git-streamed": "^1.8.0",
"gulp-jshint": "^2.0.0",
"gulp-json-editor": "^2.2.1",
"gulp-prepro": "^2.4.0",
"gulp-qunits": "^2.1.1",
"gulp-rename": "^1.2.2",
@ -61,6 +57,7 @@
"gulp-whitespace": "^0.1.0",
"gulp-zip": "^3.2.0",
"husky": "^0.11.4",
"jsdom": "^9.4.0",
"jshint": "^2.9.2",
"jshint-summary": "^0.4.0",
"merge-stream": "^1.0.0",
@ -70,14 +67,11 @@
"require-dir": "^0.3.0",
"resemblejs": "^2.2.1",
"run-sequence": "^1.2.2",
"source-map-support": "^0.4.0",
"stats.js": "0.16.0",
"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
},

1
packages/paper-jsdom Submodule

@ -0,0 +1 @@
Subproject commit 2bed95b950805864a91999afeaed469ac4403338

@ -0,0 +1 @@
Subproject commit 807961a794f920e107c483ce5301867af8c0cb27

View file

@ -14,6 +14,9 @@
"path": "../gulp",
"folder_exclude_patterns": ["jsdoc"]
},
{
"path": "../packages",
},
{
"path": "../travis",
},