Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #94 from andreruffert/release-0.3.4
Browse files Browse the repository at this point in the history
chore(release): v0.3.4
  • Loading branch information
andreruffert committed Sep 25, 2014
2 parents 2939af8 + c63b262 commit f2bb1e7
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 15 deletions.
33 changes: 33 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,42 @@ module.exports = function (grunt) {
src: ['<%= config.dist %>/rangeslider.js'],
dest: '<%= config.dist %>/rangeslider.min.js'
}
},

// Increment version
bump: {
options: {
files: ['bower.json', 'package.json'],
updateConfigs: ['pkg'],
commitMessage: 'chore(release): v%VERSION%',
commitFiles: [
'bower.json',
'package.json',
'dist'
],
createTag: false
}
}
});

// Generate codename
grunt.registerTask('codename', 'generate a fancy codename', function() {
var crayola = require('crayola');
var pkg = grunt.file.readJSON('./package.json');

pkg.codename = crayola().name;
grunt.log.write('The new codename is ' + pkg.codename);
grunt.file.write('./package.json', JSON.stringify(pkg, null, 2));
});

// Build task
grunt.registerTask('build', ['compass:dist', 'jshint', 'concat:dist', 'uglify:dist']);

// Release task
grunt.registerTask('release', [
'bump-only',
'codename',
'build',
'bump-commit'
]);
};
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rangeslider.js",
"version": "0.3.3",
"version": "0.3.4",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"authors": [
"André Ruffert <[email protected]>"
Expand Down
5 changes: 3 additions & 2 deletions dist/rangeslider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! rangeslider.js - v0.3.3 | (c) 2014 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
/*! rangeslider.js - v0.3.4 | (c) 2014 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
(function(factory) {
'use strict';

Expand Down Expand Up @@ -28,6 +28,7 @@

var pluginName = 'rangeslider',
pluginInstances = [],
pluginIdentifier = 0,
inputrange = supportsRange(),
defaults = {
polyfill: true,
Expand Down Expand Up @@ -103,7 +104,7 @@
if (inputrange) { return false; }
}

this.identifier = 'js-' + pluginName + '-' +(+new Date());
this.identifier = 'js-' + pluginName + '-' +(pluginIdentifier++);
this.min = parseFloat(this.$element[0].getAttribute('min') || 0);
this.max = parseFloat(this.$element[0].getAttribute('max') || 100);
this.value = parseFloat(this.$element[0].value || this.min + (this.max-this.min)/2);
Expand Down
4 changes: 2 additions & 2 deletions dist/rangeslider.min.js

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

21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "rangeslider.js",
"title": "rangeslider.js",
"description": "Simple, small and fast JavaScript/jQuery polyfill for the HTML5 <input type=\"range\"> slider element",
"version": "0.3.3",
"version": "0.3.4",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"license": "MIT",
"keywords": [
Expand All @@ -29,14 +29,17 @@
},
"dependencies": {},
"devDependencies": {
"crayola": "0.0.1",
"grunt": "~0.4.2",
"load-grunt-tasks": "~0.2.1",
"time-grunt": "~0.2.7",
"grunt-contrib-watch": "~0.5.2",
"grunt-contrib-jshint": "~0.8.0",
"jshint-stylish": "~0.1.5",
"grunt-bump": "0.0.15",
"grunt-contrib-compass": "~0.7.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.7"
}
}
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-watch": "~0.5.2",
"jshint-stylish": "~0.1.5",
"load-grunt-tasks": "~0.2.1",
"time-grunt": "~0.2.7"
},
"codename": "Red Orange"
}
3 changes: 2 additions & 1 deletion src/rangeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

var pluginName = 'rangeslider',
pluginInstances = [],
pluginIdentifier = 0,
inputrange = supportsRange(),
defaults = {
polyfill: true,
Expand Down Expand Up @@ -102,7 +103,7 @@
if (inputrange) { return false; }
}

this.identifier = 'js-' + pluginName + '-' +(+new Date());
this.identifier = 'js-' + pluginName + '-' +(pluginIdentifier++);
this.min = parseFloat(this.$element[0].getAttribute('min') || 0);
this.max = parseFloat(this.$element[0].getAttribute('max') || 100);
this.value = parseFloat(this.$element[0].value || this.min + (this.max-this.min)/2);
Expand Down

0 comments on commit f2bb1e7

Please sign in to comment.