Skip to content

Commit

Permalink
Introduce paper-jsdom and paper-jsdom-canvas submodules.
Browse files Browse the repository at this point in the history
Relates to #1252
  • Loading branch information
lehni committed Apr 19, 2017
1 parent 7dea96c commit 2bac4e7
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/dist/*/
/.nvmrc
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"gulpfile.js",
"gulp",
"node_modules",
"packages",
"projects",
"src",
"test",
Expand Down
25 changes: 22 additions & 3 deletions gulp/tasks/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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() {
Expand Down
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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
},
Expand Down
1 change: 1 addition & 0 deletions packages/paper-jsdom
Submodule paper-jsdom added at 2bed95
1 change: 1 addition & 0 deletions packages/paper-jsdom-canvas
Submodule paper-jsdom-canvas added at 807961
3 changes: 3 additions & 0 deletions projects/paperjs.sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"path": "../gulp",
"folder_exclude_patterns": ["jsdoc"]
},
{
"path": "../packages",
},
{
"path": "../travis",
},
Expand Down

0 comments on commit 2bac4e7

Please sign in to comment.