Skip to content

Commit

Permalink
update deps, add touch events
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjasort committed Jul 21, 2015
1 parent 97e869b commit 769dbdc
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 35 deletions.
44 changes: 27 additions & 17 deletions dist/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20260,7 +20260,7 @@ module.exports = require('./lib/React');
},{"./lib/React":31}],159:[function(require,module,exports){
module.exports={
"name": "react-star-rating",
"version": "1.3.0",
"version": "1.3.1",
"description": "A simple star rating component built with React.",
"main": "./dist/react-star-rating.min.js",
"scripts": {
Expand All @@ -20272,27 +20272,27 @@ module.exports={
"react": "^0.13.0"
},
"devDependencies": {
"babel-eslint": "^3.1.8",
"babelify": "^5.0.4",
"browserify": "^9.0.3",
"gulp": "^3.8.11",
"babel-eslint": "^3.1.23",
"babelify": "^6.1.3",
"browserify": "^11.0.0",
"gulp": "^3.9.0",
"gulp-babel": "^5.1.0",
"gulp-concat": "^2.5.2",
"gulp-eslint": "^0.12.0",
"gulp-jshint": "^1.9.2",
"gulp-minify-css": "^1.1.1",
"gulp-rename": "^1.2.0",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^0.15.0",
"gulp-jshint": "^1.11.2",
"gulp-minify-css": "^1.2.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.3",
"gulp-sass": "^1.3.3",
"gulp-uglify": "^1.1.0",
"gulp-webserver": "^0.9.0",
"jshint-stylish": "^1.0.1",
"node-bourbon": "^4.2.1-beta1",
"through2": "^0.6.3",
"gulp-sass": "^2.0.4",
"gulp-uglify": "^1.2.0",
"gulp-webserver": "^0.9.1",
"jshint-stylish": "^2.0.1",
"node-bourbon": "^4.2.3",
"through2": "^2.0.0",
"vinyl-source-stream": "^1.1.0"
},
"dependencies": {
"classnames": "^2.1.1"
"classnames": "^2.1.3"
}
}

Expand Down Expand Up @@ -20335,6 +20335,10 @@ var StarRating = (function (_React$Component) {
_classCallCheck(this, StarRating);

_get(Object.getPrototypeOf(StarRating.prototype), "constructor", this).call(this, props);

// initialize touch events
React.initializeTouchEvents();

this.state = {
ratingCache: {
pos: 0,
Expand All @@ -20352,6 +20356,12 @@ var StarRating = (function (_React$Component) {

_createClass(StarRating, {
getStars: {

/**
* Gets the stars based on ratingAmount
* @return {string} stars
*/

value: function getStars() {
var stars = "";
var numRating = this.props.ratingAmount;
Expand Down
9 changes: 9 additions & 0 deletions dist/react-star-rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ var StarRating = (function (_React$Component) {
_classCallCheck(this, StarRating);

_get(Object.getPrototypeOf(StarRating.prototype), 'constructor', this).call(this, props);

// initialize touch events
_react2['default'].initializeTouchEvents();

this.state = {
ratingCache: {
pos: 0,
Expand All @@ -61,6 +65,11 @@ var StarRating = (function (_React$Component) {

_createClass(StarRating, [{
key: 'getStars',

/**
* Gets the stars based on ratingAmount
* @return {string} stars
*/
value: function getStars() {
var stars = '';
var numRating = this.props.ratingAmount;
Expand Down
2 changes: 1 addition & 1 deletion dist/react-star-rating.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name=viewport content="width=device-width, initial-scale=1">
<title>React Star Rating</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link href='http://fonts.googleapis.com/css?family=Philosopher:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@
"react": "^0.13.0"
},
"devDependencies": {
"babel-eslint": "^3.1.8",
"babelify": "^5.0.4",
"browserify": "^9.0.3",
"gulp": "^3.8.11",
"babel-eslint": "^3.1.23",
"babelify": "^6.1.3",
"browserify": "^11.0.0",
"gulp": "^3.9.0",
"gulp-babel": "^5.1.0",
"gulp-concat": "^2.5.2",
"gulp-eslint": "^0.12.0",
"gulp-jshint": "^1.9.2",
"gulp-minify-css": "^1.1.1",
"gulp-rename": "^1.2.0",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^0.15.0",
"gulp-jshint": "^1.11.2",
"gulp-minify-css": "^1.2.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.3",
"gulp-sass": "^1.3.3",
"gulp-uglify": "^1.1.0",
"gulp-webserver": "^0.9.0",
"jshint-stylish": "^1.0.1",
"node-bourbon": "^4.2.1-beta1",
"through2": "^0.6.3",
"gulp-sass": "^2.0.4",
"gulp-uglify": "^1.2.0",
"gulp-webserver": "^0.9.1",
"jshint-stylish": "^2.0.1",
"node-bourbon": "^4.2.3",
"through2": "^2.0.0",
"vinyl-source-stream": "^1.1.0"
},
"dependencies": {
"classnames": "^2.1.1"
"classnames": "^2.1.3"
}
}
8 changes: 8 additions & 0 deletions src/StarRating.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class StarRating extends React.Component {

constructor(props) {
super(props);

// initialize touch events
React.initializeTouchEvents();

this.state = {
ratingCache: {
pos: 0,
Expand All @@ -32,6 +36,10 @@ class StarRating extends React.Component {
};
}

/**
* Gets the stars based on ratingAmount
* @return {string} stars
*/
getStars() {
var stars = '';
var numRating = this.props.ratingAmount;
Expand Down

0 comments on commit 769dbdc

Please sign in to comment.