From 075dab169178b2ee1835c9360558ea99eeb73781 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 20 Mar 2015 23:49:04 +0900 Subject: [PATCH] Bump version --- bower.json | 2 +- dist/palette.css | 2 +- dist/palette.js | 31 +++++++++++++++++++++++++------ dist/palette.less | 2 +- dist/palette.scss | 2 +- dist/palette.styl | 2 +- 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/bower.json b/bower.json index f7f2abb..91b0a46 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "google-material-color", - "version": "1.2.1", + "version": "1.2.2", "description": "Google material color (http://www.google.com/design/spec/style/color.html) implementation for Sass, Less, Stylus, CSS and JS.", "homepage": "https://github.com/danlevan/google-material-color", "authors": [ diff --git a/dist/palette.css b/dist/palette.css index dabb421..fb1dbc7 100644 --- a/dist/palette.css +++ b/dist/palette.css @@ -1,5 +1,5 @@ /** - * google-material-color v1.2.1 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ .palette-Red.bg { diff --git a/dist/palette.js b/dist/palette.js index 70c6301..b0cd8c8 100644 --- a/dist/palette.js +++ b/dist/palette.js @@ -1,5 +1,5 @@ /** - * google-material-color v1.2.1 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ (function(root, factory) { @@ -11,6 +11,25 @@ root.palette = factory(); } })(this, function() { + // avoid using lodash in dependencies + function keys(obj) { + var keys, key; + + keys = []; + + for (var key in obj) if (obj.hasOwnProperty(key)) { + keys.push(key); + } + + return keys; + } + + // avoid using lodash in dependencies + function random(min, max) { + return Math.floor(Math.random() * ( max - min + 1 )) + min; + } + + return { palette: { 'Red': { @@ -353,12 +372,12 @@ random: function(shade) { var colors, color, shades; - colors = _.keys(this.palette); - color = colors[_.random(0, colors.length - 1)]; + colors = keys(this.palette); + color = colors[random(0, colors.length - 1)]; - if (_.isUndefined(shade)) { - shades = _.keys(color); - shade = shades[_.random(0, shades.length - 1)]; + if (shade == null) { + shades = keys(color); + shade = shades[random(0, shades.length - 1)]; } return this.get(color, shade); diff --git a/dist/palette.less b/dist/palette.less index 1d20b97..20cf796 100644 --- a/dist/palette.less +++ b/dist/palette.less @@ -1,5 +1,5 @@ /** - * google-material-color v1.2.1 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ @palette-Red-50: #FFEBEE; diff --git a/dist/palette.scss b/dist/palette.scss index 16eb14f..a4e3cc0 100644 --- a/dist/palette.scss +++ b/dist/palette.scss @@ -1,5 +1,5 @@ /** - * google-material-color v1.2.1 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ $palette: ( diff --git a/dist/palette.styl b/dist/palette.styl index 524f12e..916c56a 100644 --- a/dist/palette.styl +++ b/dist/palette.styl @@ -1,5 +1,5 @@ /** - * google-material-color v1.2.1 + * google-material-color v1.2.2 * https://github.com/danlevan/google-material-color */ $palette = {