diff --git a/Gulpfile.js b/Gulpfile.js index 7b191a6..a329d2a 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -2,9 +2,21 @@ var gulp = require('gulp'); var iconfont = require('gulp-iconfont'); var iconfontCss = require('gulp-iconfont-css'); +String.prototype.toTitleCase = function() { + return this.replace(/\w\S*/g, function(txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); +}; + String.prototype.toCamelCase = function() { - var str = this.replace('--', ''); - return str.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) { + var str = this.split('--'); + var result; + + if (str && str.length > 1) { + result = str[0] + str[1].toTitleCase(); + } else { + result = this; + } + + return result.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) { if (p2) return p2.toUpperCase(); return p1.toLowerCase(); }); diff --git a/package.json b/package.json index e629759..3c981c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cartoassets", "description": "Share frontend assets between different CartoDB repositories", - "version": "0.1.19", + "version": "0.1.20", "homepage": "https://github.com/cartodb/CartoAssets", "author": { "name": "CartoDB", diff --git a/src/fonts/cartoIcon.eot b/src/fonts/cartoIcon.eot index 887caac..3bc7df2 100644 Binary files a/src/fonts/cartoIcon.eot and b/src/fonts/cartoIcon.eot differ diff --git a/src/fonts/cartoIcon.ttf b/src/fonts/cartoIcon.ttf index 2cfff3c..2a4e853 100644 Binary files a/src/fonts/cartoIcon.ttf and b/src/fonts/cartoIcon.ttf differ diff --git a/src/fonts/cartoIcon.woff b/src/fonts/cartoIcon.woff index 06005bb..f736c60 100644 Binary files a/src/fonts/cartoIcon.woff and b/src/fonts/cartoIcon.woff differ diff --git a/src/scss/cdb-icon-font.scss b/src/scss/cdb-icon-font.scss index 14b5258..0cd6074 100644 --- a/src/scss/cdb-icon-font.scss +++ b/src/scss/cdb-icon-font.scss @@ -54,14 +54,14 @@ All available icons in CartoDB.
- -

heartempty

+ +

heartEmpty

- -

heartfill

+ +

heartFill

@@ -234,8 +234,8 @@ All available icons in CartoDB.
- -

unlockwithEllipsis

+ +

unlockWithellipsis

@@ -631,12 +631,12 @@ All available icons in CartoDB. } -.CDB-IconFont--heartempty::before { +.CDB-IconFont--heartEmpty::before { content: '\E003'; } -.CDB-IconFont--heartfill::before { +.CDB-IconFont--heartFill::before { content: '\E004'; } @@ -781,7 +781,7 @@ All available icons in CartoDB. } -.CDB-IconFont--unlockwithEllipsis::before { +.CDB-IconFont--unlockWithellipsis::before { content: '\E021'; }