mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
21b8bdd0f3 | ||
|
881d2f1100 | ||
|
117d094df9 | ||
|
ae8b2ade39 | ||
|
6943dc3ebe | ||
|
cb41a72b5b | ||
|
17b1712b82 | ||
|
24b28504a1 | ||
|
3e926ff093 | ||
|
b9d4c5c2a6 | ||
|
c13acba6b1 | ||
|
cf92045489 | ||
|
025c34d07c | ||
|
eb14e489a7 |
|
@ -87,7 +87,10 @@ module.exports = function(grunt) {
|
|||
// Exludes
|
||||
// TODO: remove this (for now we still get warnings from the lib folder)
|
||||
'!src/js/**/lib/**/*.js'
|
||||
]
|
||||
],
|
||||
options: {
|
||||
fix: grunt.option('fix') // this will get params from the flags
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
32
RELEASE.md
Normal file
32
RELEASE.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# Release instructions
|
||||
|
||||
- retrieve source code and dependencies
|
||||
- clone piskel `git clone https://github.com/piskelapp/piskel`
|
||||
- clone piskel website `git clone https://github.com/piskelapp/piskel-website`
|
||||
- download the appengine SDK for python at [this url](https://cloud.google.com/appengine/docs/standard/python/download). It seems recent versions don't work for me on Windows. [GoogleAppEngine-1.9.67.msi](https://storage.cloud.google.com/appengine-sdks/featured/GoogleAppEngine-1.9.67.msi?_ga=2.6838962.-1257793585.1543157659) looks ok...
|
||||
- prepare the release
|
||||
- in `piskel-website` clone, checkout the `master` branch, not the `release`. The release branch is similar to the master branch, except it doesn't ignore the statics files coming from the `piskel` project. The idea is that we can easily checkout the release branch to do a new release, without having to rebuild piskel, in case nothing changed in piskel itself. We will switch to the release branch when we perform the final release.
|
||||
- in `piskel` clone, create a new branch for the release `git checkout -b vX.Y`
|
||||
- build and copy piskel to piskel-website (assumes the clones are in the same folder) `grunt && node bin/copy-to-piskel-website.js`
|
||||
- local test
|
||||
- start piskel-website in the Google app engine launcher, test manually the update
|
||||
- if any issue is detected create a commit to fix it (on the `vX.Y` branch) and push it.
|
||||
|
||||
- beta test
|
||||
- check the version in app.yaml is set to 'beta'. For historical reasons, alpha is the "production" version, while beta is the ... beta version. Don't ask.
|
||||
- in the google app engine launcher, deploy this version.
|
||||
- go to https://beta-dot-piskel-app.appspot.com and test (while this is not production frontend, it shares the same database, so be careful with what you create and delete)
|
||||
- if any issue is detected create a commit to fix it (on `master`) and push it.
|
||||
- check caches...
|
||||
- If any icon was modified or any script of piskel-website was modified, there's no nice way to clean the cache on each release... so we just put a time stamp in the requests. eg `background-image: url(../img/icons@2x.png?20181125);` or `<script type="text/javascript" src="/static/js/piskel-animated-preview.js?20181124"></script>`. Erk.
|
||||
- finalize the release
|
||||
- in `piskel` update version in package.json. Remove the "-SNAPSHOT" at the end and commit the change, with a commit message such as `release: bump version to vX.Y`.
|
||||
- in `piskel-website` checkout the `release` branch. Rebase it on master (that's pretty bad, we should probably cherry pick all the changes between the two branches...)
|
||||
- once again build and copy piskel to piskel-website
|
||||
- in `piskel-website` run `git status` to check that there are a bunch of changes to commit. (test locally again if you are paranoid)
|
||||
- in `piskel-website` commit the current changes with a commit message such as `update statics for release vX.Y`
|
||||
- Check that the version in app.yaml is now set to alpha. Deploy. Pray.
|
||||
- post release
|
||||
- in piskel-website push the release branch to github
|
||||
- in piskel add a last commit to update the version in package.json to update the version to `vX+1.0-SNAPSHOT`
|
||||
- create a tag on github
|
52
package.json
52
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "piskel",
|
||||
"version": "0.15.0",
|
||||
"version": "0.15.2-SNAPSHOT",
|
||||
"description": "Pixel art editor",
|
||||
"author": "Julian Descottes <julian.descottes@gmail.com>",
|
||||
"contributors": [
|
||||
|
@ -23,39 +23,45 @@
|
|||
"main": "./dest/prod/index.html",
|
||||
"scripts": {
|
||||
"test": "grunt test",
|
||||
"start": "nodewebkit",
|
||||
"dev": "grunt play",
|
||||
"start": "grunt build && nw",
|
||||
"preversion": "grunt test build",
|
||||
"postversion": "git push && git push --tags && npm publish",
|
||||
"release": "grunt && node ./bin/copy-to-piskel-website"
|
||||
"release": "grunt && node ./bin/copy-to-piskel-website",
|
||||
"build": "grunt desktop",
|
||||
"build:mac": "grunt desktop-mac",
|
||||
"format": "grunt eslint --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dateformat": "2.0.0",
|
||||
"fs-extra": "3.0.1",
|
||||
"grunt": "0.4.5",
|
||||
"dateformat": "4.5.1",
|
||||
"fs-extra": "10.0.0",
|
||||
"grunt": "1.4.1",
|
||||
"grunt-casperjs": "^2.2.1",
|
||||
"grunt-contrib-clean": "1.1.0",
|
||||
"grunt-cli": "^1.4.3",
|
||||
"grunt-contrib-clean": "2.0.0",
|
||||
"grunt-contrib-concat": "1.0.1",
|
||||
"grunt-contrib-connect": "1.0.2",
|
||||
"grunt-contrib-connect": "3.0.0",
|
||||
"grunt-contrib-copy": "1.0.0",
|
||||
"grunt-contrib-jshint": "1.1.0",
|
||||
"grunt-contrib-uglify": "2.3.0",
|
||||
"grunt-contrib-watch": "1.0.0",
|
||||
"grunt-eslint": "^19.0.0",
|
||||
"grunt-include-replace": "4.0.1",
|
||||
"grunt-jscs": "2.8.0",
|
||||
"grunt-karma": "1.0.0",
|
||||
"grunt-contrib-jshint": "3.0.0",
|
||||
"grunt-contrib-uglify": "5.0.1",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-eslint": "23.0.0",
|
||||
"grunt-include-replace": "5.0.0",
|
||||
"grunt-jscs": "3.0.1",
|
||||
"grunt-karma": "4.0.2",
|
||||
"grunt-leading-indent": "0.2.0",
|
||||
"grunt-nw-builder": "3.1.0",
|
||||
"grunt-replace": "1.0.1",
|
||||
"grunt-spritesmith": "6.4.0",
|
||||
"jasmine-core": "2.6.1",
|
||||
"karma": "1.7.0",
|
||||
"karma-jasmine": "1.1.0",
|
||||
"grunt-replace": "2.0.2",
|
||||
"grunt-spritesmith": "^6.9.0",
|
||||
"jasmine-core": "3.8.0",
|
||||
"karma": "6.3.4",
|
||||
"karma-jasmine": "4.0.1",
|
||||
"karma-phantomjs-launcher": "1.0.4",
|
||||
"load-grunt-tasks": "3.5.0",
|
||||
"load-grunt-tasks": "5.1.0",
|
||||
"nw": "0.54.0",
|
||||
"phantomjs": "2.1.7",
|
||||
"phantomjs-polyfill-object-assign": "0.0.2",
|
||||
"promise-polyfill": "6.0.2",
|
||||
"promise-polyfill": "8.2.0",
|
||||
"rmdir": "1.2.0"
|
||||
},
|
||||
"window": {
|
||||
|
@ -66,6 +72,6 @@
|
|||
"height": 700
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.0"
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
{
|
||||
importType: this.getImportType_(),
|
||||
frameSizeX: this.getImportType_() === 'single' ?
|
||||
this.resizeWidth.value : this.sanitizeInputValue_(this.frameSizeX, 1),
|
||||
this.resizeWidth.value : this.sanitizeInputValue_(this.frameSizeX, 1),
|
||||
frameSizeY: this.getImportType_() === 'single' ?
|
||||
this.resizeHeight.value : this.sanitizeInputValue_(this.frameSizeY, 1),
|
||||
this.resizeHeight.value : this.sanitizeInputValue_(this.frameSizeY, 1),
|
||||
frameOffsetX: this.sanitizeInputValue_(this.frameOffsetX, 0),
|
||||
frameOffsetY: this.sanitizeInputValue_(this.frameOffsetY, 0),
|
||||
smoothing: !!this.smoothResize.checked,
|
||||
|
|
|
@ -83,21 +83,21 @@
|
|||
batchAll(frames, function (frame) {
|
||||
return this.cachedFrameProcessor.get(frame);
|
||||
}.bind(this))
|
||||
.then(function (results) {
|
||||
var colors = {};
|
||||
results.forEach(function (result) {
|
||||
Object.keys(result).forEach(function (color) {
|
||||
colors[color] = true;
|
||||
.then(function (results) {
|
||||
var colors = {};
|
||||
results.forEach(function (result) {
|
||||
Object.keys(result).forEach(function (color) {
|
||||
colors[color] = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
// Remove transparent color from used colors
|
||||
delete colors[pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)];
|
||||
// Remove transparent color from used colors
|
||||
delete colors[pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)];
|
||||
|
||||
var hexColors = Object.keys(colors).map(function (color) {
|
||||
return pskl.utils.intToHex(color);
|
||||
});
|
||||
this.setCurrentColors(hexColors);
|
||||
}.bind(this));
|
||||
var hexColors = Object.keys(colors).map(function (color) {
|
||||
return pskl.utils.intToHex(color);
|
||||
});
|
||||
this.setCurrentColors(hexColors);
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
ns.CurrentColorsService.prototype.isCurrentColorsPaletteSelected_ = function () {
|
||||
|
|
|
@ -97,15 +97,15 @@
|
|||
* @private
|
||||
*/
|
||||
ns.ImportService.prototype.createImagesFromSheet_ = function (image,
|
||||
frameSizeX, frameSizeY, frameOffsetX, frameOffsetY) {
|
||||
frameSizeX, frameSizeY, frameOffsetX, frameOffsetY) {
|
||||
return pskl.utils.CanvasUtils.createFramesFromImage(
|
||||
image,
|
||||
frameOffsetX,
|
||||
frameOffsetY,
|
||||
frameSizeX,
|
||||
frameSizeY,
|
||||
/*useHorizonalStrips=*/ true,
|
||||
/*ignoreEmptyFrames=*/ true);
|
||||
image,
|
||||
frameOffsetX,
|
||||
frameOffsetY,
|
||||
frameSizeX,
|
||||
frameSizeY,
|
||||
/*useHorizonalStrips=*/ true,
|
||||
/*ignoreEmptyFrames=*/ true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@
|
|||
* @private
|
||||
*/
|
||||
ns.ImportService.prototype.createPiskelFromImages_ = function (images, name,
|
||||
frameSizeX, frameSizeY, smoothing) {
|
||||
frameSizeX, frameSizeY, smoothing) {
|
||||
name = name || 'Imported piskel';
|
||||
var frames = this.createFramesFromImages_(images, frameSizeX, frameSizeY, smoothing);
|
||||
var layer = pskl.model.Layer.fromFrames('Layer 1', frames);
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
ns.Flip = function () {
|
||||
this.toolId = 'tool-flip';
|
||||
this.helpText = 'Flip vertically';
|
||||
this.helpText = 'Flip horizontally';
|
||||
this.tooltipDescriptors = [
|
||||
{key : 'alt', description : 'Flip horizontally'},
|
||||
{key : 'alt', description : 'Flip vertically'},
|
||||
{key : 'ctrl', description : 'Apply to all layers'},
|
||||
{key : 'shift', description : 'Apply to all frames'}
|
||||
];
|
||||
|
|
|
@ -259,7 +259,7 @@
|
|||
for (var j = 0 ; j < row.length ; j++) {
|
||||
context.clearRect(0, 0 , frameWidth, frameHeight);
|
||||
context.drawImage(image, frameWidth * i, frameHeight * j,
|
||||
frameWidth, frameHeight, 0, 0, frameWidth, frameHeight);
|
||||
frameWidth, frameHeight, 0, 0, frameWidth, frameHeight);
|
||||
var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight);
|
||||
chunkFrames.push({
|
||||
index : layout[i][j],
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
var s4 = function () {
|
||||
return Math.floor((1 + Math.random()) * 0x10000)
|
||||
.toString(16)
|
||||
.substring(1);
|
||||
.toString(16)
|
||||
.substring(1);
|
||||
};
|
||||
|
||||
ns.Uuid = {
|
||||
|
|
|
@ -33,9 +33,10 @@
|
|||
var piskelData = data.piskel;
|
||||
var name = piskelData.name || 'Deserialized piskel';
|
||||
var description = piskelData.description || '';
|
||||
var fps = typeof piskelData.fps != 'undefined' ? piskelData.fps : 12;
|
||||
|
||||
var descriptor = new pskl.model.piskel.Descriptor(name, description);
|
||||
this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, piskelData.fps, descriptor);
|
||||
this.piskel_ = new pskl.model.Piskel(piskelData.width, piskelData.height, fps, descriptor);
|
||||
this.hiddenFrames = piskelData.hiddenFrames || [];
|
||||
|
||||
this.layersToLoad_ = piskelData.layers.length;
|
||||
|
|
Loading…
Reference in New Issue
Block a user