mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Dev environment : closure compiler + jshint update
Fixed error raised by closure compiler Added es3 option to jshint (detect trailing commas) Added curly option to jshint (missing curly braces for if/for blocks) Removed trailing whitespaces (not enforced through jshint though)
This commit is contained in:
10
Gruntfile.js
10
Gruntfile.js
@ -36,6 +36,8 @@ module.exports = function(grunt) {
|
||||
undef : true,
|
||||
latedef : true,
|
||||
browser : true,
|
||||
curly : true,
|
||||
es3 : true,
|
||||
globals : {'$':true, 'jQuery' : true, 'pskl':true, 'Events':true, 'Constants':true, 'console' : true, 'module':true, 'require':true}
|
||||
},
|
||||
files: [
|
||||
@ -61,17 +63,17 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
ghost : {
|
||||
default : getGhostConfig(3000),
|
||||
'default' : getGhostConfig(3000),
|
||||
local : getGhostConfig(50)
|
||||
},
|
||||
concat : {
|
||||
options : {
|
||||
separator : ';',
|
||||
separator : ';'
|
||||
},
|
||||
dist : {
|
||||
src : piskelScripts,
|
||||
dest : 'build/piskel-packaged.js',
|
||||
},
|
||||
dest : 'build/piskel-packaged.js'
|
||||
}
|
||||
},
|
||||
uglify : {
|
||||
options : {
|
||||
|
@ -53,7 +53,7 @@
|
||||
[1],
|
||||
[5],
|
||||
[10,true], //default
|
||||
[20],
|
||||
[20]
|
||||
];
|
||||
|
||||
for (var i = 0 ; i < dpis.length ; i++) {
|
||||
|
@ -56,7 +56,10 @@
|
||||
// Do what you need to for this
|
||||
pixels.push({"col": x0, "row": y0});
|
||||
|
||||
if ((x0==x1) && (y0==y1)) break;
|
||||
if ((x0==x1) && (y0==y1)) {
|
||||
break;
|
||||
}
|
||||
|
||||
var e2 = 2*err;
|
||||
if (e2>-dy){
|
||||
err -= dy;
|
||||
|
@ -34,8 +34,10 @@ if (typeof Function.prototype.bind !== "function") {
|
||||
var ns = $.namespace("pskl.utils");
|
||||
|
||||
ns.rgbToHex = function(r, g, b) {
|
||||
if (r > 255 || g > 255 || b > 255)
|
||||
if (r > 255 || g > 255 || b > 255) {
|
||||
throw "Invalid color component";
|
||||
}
|
||||
|
||||
return ((r << 16) | (g << 8) | b).toString(16);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user