From 76563750a06a491d94aa3b187ef950065a67f051 Mon Sep 17 00:00:00 2001 From: Arjan Kempes Date: Fri, 6 Oct 2017 22:16:11 +0200 Subject: [PATCH] Fix typo & added scripts to package.json --- Gruntfile.js | 2 +- bower.json | 2 +- dist/ng-rateit.min.js | 2 +- package.json | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index f509424..0302350 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -166,7 +166,7 @@ module.exports = function (grunt) { 'cssmin' ]); - grunt.registerTask('deploy-path', [ + grunt.registerTask('deploy-patch', [ 'version::patch', 'ghpage' ]); diff --git a/bower.json b/bower.json index e90911a..65ce04b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-rateit", - "version": "3.0.4", + "version": "3.0.5", "homepage": "https://github.com/akempes/angular-rateit", "authors": [ "Arjan Kempes " diff --git a/dist/ng-rateit.min.js b/dist/ng-rateit.min.js index 5dca26f..df29119 100644 --- a/dist/ng-rateit.min.js +++ b/dist/ng-rateit.min.js @@ -1 +1 @@ -angular.module("ngRateIt",["ng"]).directive("ngRateIt",["$q",function(a){"use strict";return{scope:{ngModel:"=",min:"=?min",max:"=?max",step:"=?step",readOnly:"&?readOnly",pristine:"=?pristine",resetable:"&?resetable",starWidth:"=?starWidth",starHeight:"=?starHeight",canelWidth:"=?canelWidth",cancelHeight:"=?cancelHeight",rated:"=?rated",reset:"=?reset",beforeRated:"=?beforeRated",beforeReset:"=?beforeReset"},templateUrl:"ngRateIt/ng-rate-it.html",require:"ngModel",replace:!0,link:function(b,c,d){d.readOnly||(b.readOnly=function(){return!1}),d.resetable||(b.resetable=function(){return!0}),d.beforeRated||(b.beforeRated=function(){var b=a.defer();return b.resolve(),b.promise}),d.rated||(b.rated=function(){}),d.beforeReset||(b.beforeReset=function(){var b=a.defer();return b.resolve(),b.promise}),d.reset||(b.reset=function(){})},controller:"ngRateItController"}}]).controller("ngRateItController",["$scope","$timeout",function(a,b){"use strict";a.isTouch=!!window.hasOwnProperty("ontouchstart")||window.navigator.msMaxTouchPoints>0,a.orgValue=angular.copy(a.ngModel),a.min=a.min||0,a.max=a.max||5,a.step=a.step||.5,a.pristine=a.orgValue===a.ngModel,a.starWidth=a.starWidth||16,a.starPartWidth=a.starWidth*a.step,a.starHeight=a.starHeight||16,a.canelWidth=a.canelWidth||a.starWidth,a.cancelHeight=a.cancelHeight||a.starHeight;var c=a.max-a.min,d=c/a.step,e=a.$watch("ngModel",function(){a.pristine=a.orgValue===a.ngModel}),f=function(a){return(a+1)/d*c};a.getStartParts=function(){return new Array(d)},a.getStarOffset=function(b){var c=1/a.step;return-a.starWidth/c*(b%c)},a.isSelected=function(b){return f(b)<=a.ngModel-a.min},a.removeRating=function(){a.resetable()&&!a.readOnly()&&a.beforeReset().then(function(){a.ngModel=a.min,a.reset()})},a.setValue=function(c){if(!a.readOnly()){var d=angular.copy(a.min+f(c));a.beforeRated(d).then(function(){a.ngModel=d,b(function(){a.rated()})})}},a.$on("$destroy",function(){e()})}]).run(["$templateCache",function(a){"use strict";a.put("ngRateIt/ng-rate-it.html",'
")}]); +angular.module("ngRateIt",["ng"]).directive("ngRateIt",["$q",function(a){"use strict";var b=function(b,c,d){d.readOnly||(b.readOnly=function(){return!1}),d.resetable||(b.resetable=function(){return!0}),d.beforeRated||(b.beforeRated=function(){var b=a.defer();return b.resolve(),b.promise}),d.rated||(b.rated=function(){}),d.beforeReset||(b.beforeReset=function(){var b=a.defer();return b.resolve(),b.promise}),d.reset||(b.reset=function(){})};return{scope:{ngModel:"=",min:"=?min",max:"=?max",step:"=?step",readOnly:"&?readOnly",pristine:"=?pristine",resetable:"&?resetable",starWidth:"=?starWidth",starHeight:"=?starHeight",canelWidth:"=?canelWidth",cancelHeight:"=?cancelHeight",rated:"=?rated",reset:"=?reset",beforeRated:"=?beforeRated",beforeReset:"=?beforeReset"},templateUrl:"ngRateIt/ng-rate-it.html",require:"ngModel",replace:!0,link:b,controller:"ngRateItController"}}]).controller("ngRateItController",["$scope","$timeout",function(a,b){"use strict";a.isTouch=!!window.hasOwnProperty("ontouchstart")||window.navigator.msMaxTouchPoints>0,a.orgValue=angular.copy(a.ngModel),a.min=a.min||0,a.max=a.max||5,a.step=a.step||.5,a.pristine=a.orgValue===a.ngModel,a.starWidth=a.starWidth||16,a.starPartWidth=a.starWidth*a.step,a.starHeight=a.starHeight||16,a.canelWidth=a.canelWidth||a.starWidth,a.cancelHeight=a.cancelHeight||a.starHeight;var c=a.max-a.min,d=c/a.step,e=a.$watch("ngModel",function(){a.pristine=a.orgValue===a.ngModel}),f=function(a){return(a+1)/d*c};a.getStartParts=function(){return new Array(d)},a.getStarOffset=function(b){var c=1/a.step,d=-(a.starWidth/c)*(b%c);return d},a.isSelected=function(b){return f(b)<=a.ngModel-a.min},a.removeRating=function(){a.resetable()&&!a.readOnly()&&a.beforeReset().then(function(){a.ngModel=a.min,a.reset()})},a.setValue=function(c){if(!a.readOnly()){var d=angular.copy(a.min+f(c));a.beforeRated(d).then(function(){a.ngModel=d,b(function(){a.rated()})})}},a.$on("$destroy",function(){e()})}]).run(["$templateCache",function(a){"use strict";a.put("ngRateIt/ng-rate-it.html",'
")}]); \ No newline at end of file diff --git a/package.json b/package.json index 0a02a4e..ed8e1f5 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,16 @@ { "name": "angular-rateit", - "version": "3.0.4", - "dependencies": {}, + "version": "3.0.5", + "scripts": { + "build": "grunt build", + "deploy": "grunt deploy-patch" + }, "repository": { "type": "git", "url": "https://github.com/akempes/angular-rateit.git" }, "devDependencies": { - "grunt": "~0.4.5", + "grunt": "^0.4.5", "grunt-cli": "^1.2.0", "grunt-contrib-clean": "^0.5.0", "grunt-contrib-copy": "^1.0.0",