Permalink
Browse files

only lint errors fixes

  • Loading branch information...
lavrton committed Feb 27, 2014
1 parent 2757842 commit eb16e291975c4a31e822438c2544ab675568769f
View
@@ -1,6 +1,5 @@
{
"curly": true,
"eqeqeq": true,
"curly": true,
"immed": true,
"latedef": true,
"newcap": true,
@@ -9,13 +8,21 @@
"undef": true,
"boss": true,
"eqnull": true,
"node": true,
"indent": 4,
"node": true,
"latedef": true,
"quotmark": "single",
"unused": true,
"trailing" : true,
"laxbreak" : true,
"globals": {
"Kinetic": false,
"document": false
"document": false,
"window" : false,
"navigator" : false,
"define" : false,
"Image" : false,
"assert" : false,
"test": false,
"addStage" : false
}
}
View
@@ -1,18 +1,18 @@
module.exports = function(grunt) {
var sourceFiles = [
// core
'src/Global.js',
'src/Util.js',
'src/Global.js',
'src/Util.js',
'src/Canvas.js',
'src/Context.js',
'src/Factory.js',
'src/Node.js',
'src/Node.js',
// filters
'src/filters/Grayscale.js',
'src/filters/Brighten.js',
'src/filters/Invert.js',
'src/filters/Blur.js',
'src/filters/Grayscale.js',
'src/filters/Brighten.js',
'src/filters/Invert.js',
'src/filters/Blur.js',
'src/filters/Mask.js',
'src/filters/RGB.js',
'src/filters/HSV.js',
@@ -28,36 +28,37 @@ module.exports = function(grunt) {
'src/filters/Kaleidoscope.js',
// core
'src/Animation.js',
'src/Tween.js',
'src/DragAndDrop.js',
'src/Container.js',
'src/Shape.js',
'src/Stage.js',
'src/Layer.js',
'src/Animation.js',
'src/Tween.js',
'src/DragAndDrop.js',
'src/Container.js',
'src/Shape.js',
'src/Stage.js',
'src/Layer.js',
'src/Group.js',
// shapes
'src/shapes/Rect.js',
'src/shapes/Circle.js',
'src/shapes/Rect.js',
'src/shapes/Circle.js',
'src/shapes/Ellipse.js',
'src/shapes/Ring.js',
'src/shapes/Wedge.js',
'src/shapes/Wedge.js',
'src/shapes/Arc.js',
'src/shapes/Image.js',
'src/shapes/Text.js',
'src/shapes/Line.js',
'src/shapes/Image.js',
'src/shapes/Text.js',
'src/shapes/Line.js',
'src/shapes/Sprite.js',
// plugins
'src/plugins/Path.js',
'src/plugins/TextPath.js',
'src/plugins/RegularPolygon.js',
'src/plugins/Star.js',
'src/plugins/Path.js',
'src/plugins/TextPath.js',
'src/plugins/RegularPolygon.js',
'src/plugins/Star.js',
'src/plugins/Label.js'
];
// Project configuration.
var lintConf = grunt.file.readJSON('.jshintrc');
var config = {
pkg: grunt.file.readJSON('package.json'),
concat: {
@@ -91,7 +92,7 @@ module.exports = function(grunt) {
},
files: [{
src: ['dist/kinetic-dev.js'],
src: ['dist/kinetic-dev.js'],
dest: 'dist/kinetic-dev.js'
}]
},
@@ -108,7 +109,7 @@ module.exports = function(grunt) {
},
files: [{
src: ['dist/kinetic-v<%= pkg.version %>-beta.js'],
src: ['dist/kinetic-v<%= pkg.version %>-beta.js'],
dest: 'dist/kinetic-v<%= pkg.version %>-beta.js'
}]
},
@@ -125,7 +126,7 @@ module.exports = function(grunt) {
},
files: [{
src: ['dist/kinetic-v<%= pkg.version %>.js'],
src: ['dist/kinetic-v<%= pkg.version %>.js'],
dest: 'dist/kinetic-v<%= pkg.version %>.js'
}]
},
@@ -137,7 +138,7 @@ module.exports = function(grunt) {
prefix: '@@'
},
files: [{
src: ['dist/kinetic-Global-v<%= pkg.version %>.min.js'],
src: ['dist/kinetic-Global-v<%= pkg.version %>.min.js'],
dest: 'dist/kinetic-Global-v<%= pkg.version %>.min.js'
}]
},
@@ -149,7 +150,7 @@ module.exports = function(grunt) {
prefix: '@@'
},
files: [{
src: ['dist/kinetic-v<%= pkg.version %>.min.js'],
src: ['dist/kinetic-v<%= pkg.version %>.min.js'],
dest: 'dist/kinetic-v<%= pkg.version %>.min.js'
}]
},
@@ -161,7 +162,7 @@ module.exports = function(grunt) {
prefix: '@@'
},
files: [{
src: ['bower-template.json'],
src: ['bower-template.json'],
dest: 'bower.json'
}]
}
@@ -180,9 +181,7 @@ module.exports = function(grunt) {
build: ['dist/*']
},
jshint: {
options: {
laxbreak: true
},
options: lintConf,
all: ['src/**/*.js']
},
copy: {
@@ -222,14 +221,14 @@ module.exports = function(grunt) {
grunt.registerTask('dev', ['clean', 'concat:dev', 'replace:dev']);
grunt.registerTask('beta', ['clean', 'concat:beta', 'replace:beta']);
grunt.registerTask('full', [
'clean',
'concat:prod',
'uglify',
'replace:prod1',
'replace:prod2',
'replace:prod3',
'clean',
'concat:prod',
'uglify',
'replace:prod1',
'replace:prod2',
'replace:prod3',
'replace:prod4',
'copy:prod1',
'copy:prod1',
'copy:prod2'
]);
grunt.registerTask('hint', ['clean', 'concat:dev', 'replace:dev', 'jshint']);
View
@@ -2,16 +2,16 @@
var BATCH_DRAW_STOP_TIME_DIFF = 500;
var now =(function() {
if (window.performance && window.performance.now) {
return function() {
return window.performance.now();
if (window.performance && window.performance.now) {
return function() {
return window.performance.now();
};
}
else {
return function() {
return new Date().getTime();
};
}
}
else {
return function() {
return new Date().getTime();
}
}
})();
var RAF = (function() {
@@ -134,7 +134,7 @@
* @memberof Kinetic.Animation.prototype
*/
isRunning: function() {
var a = Kinetic.Animation,
var a = Kinetic.Animation,
animations = a.animations,
len = animations.length,
n;
@@ -182,8 +182,8 @@
this._handleAnimation();
};
Kinetic.Animation._removeAnimation = function(anim) {
var id = anim.id,
animations = this.animations,
var id = anim.id,
animations = this.animations,
len = animations.length,
n;
@@ -270,9 +270,9 @@
if (!this.batchAnim) {
this.batchAnim = new Anim(function() {
if (that.lastBatchDrawTime && now() - that.lastBatchDrawTime > BATCH_DRAW_STOP_TIME_DIFF) {
that.batchAnim.stop();
}
if (that.lastBatchDrawTime && now() - that.lastBatchDrawTime > BATCH_DRAW_STOP_TIME_DIFF) {
that.batchAnim.stop();
}
}, this);
}
View
@@ -7,7 +7,7 @@
|| context.mozBackingStorePixelRatio
|| context.msBackingStorePixelRatio
|| context.oBackingStorePixelRatio
|| context.backingStorePixelRatio
|| context.backingStorePixelRatio
|| 1,
_pixelRatio = devicePixelRatio / backingStoreRatio;
View
@@ -291,7 +291,7 @@
context.beginPath();
context.rect(clipX, clipY, clipWidth, clipHeight);
context.clip();
context.reset();
context.reset();
}
this.children.each(function(child) {
@@ -398,5 +398,5 @@
* container.clipHeight(100);
*/
Kinetic.Collection.mapMethods(Kinetic.Container);
Kinetic.Collection.mapMethods(Kinetic.Container);
})();
Oops, something went wrong.

0 comments on commit eb16e29

Please sign in to comment.