cartoassets
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -5,8 +5,16 @@ var gulp = require('gulp'); | ||
String.prototype.toCamelCase = function() { | ||
var str = this.replace('--', ''); | ||
return str.replace(/^([A-Z])|\s(\w)/g, function(match, p1, p2, offset) { | ||
if (p2) return p2.toUpperCase(); | ||
return p1.toLowerCase(); | ||
}); | ||
}; | ||
gulp.task('default', function(){ | ||
gulp.src(['./icon_font/svgs/*.svg']) | ||
gulp.src(['./icon-font/svgs/*.svg']) | ||
.pipe(iconfontCss({ | ||
fontName: 'cartoIcon', | ||
path: './icon_font/template.jst.ejs', | ||
path: './icon-font/template.jst.ejs', | ||
targetPath: '../scss/icon-font.css.scss', | ||
@@ -18,3 +26,3 @@ fontPath: '../../fonts/' | ||
fontName: 'cartoIcon', | ||
appendCodepoints: true | ||
appendCodepoints: true | ||
})) | ||
@@ -21,0 +29,0 @@ |
{ | ||
"name": "cartoassets", | ||
"description": "Share frontend assets between different CartoDB repositories", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"homepage": "https://github.com/cartodb/CartoAssets", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -20,2 +20,6 @@ # CartoAssets [![NPM version](http://img.shields.io/npm/v/cartoassets.svg)](https://www.npmjs.org/package/cartoassets) | ||
### How to add/update the icon font | ||
See this [instructions](https://github.com/CartoDB/CartoAssets/blob/master/Icon-Fonting.md) | ||
### Publish a new version in NPM | ||
@@ -36,29 +40,1 @@ In order to publish a new version of CartoAssets you need to: | ||
How to make changes in the CartoDB icon font | ||
-------------------------------------------- | ||
If you want to edit, add or remove any icon in our CartoDB font, you should follow these steps: | ||
- Check you have [Sketch](http://bohemiancoding.com/sketch/) last version. | ||
- Open [font.sketch](http://github.com/CartoDB/CartoAssets/blob/master/icon_font/font.sketch) file and make your changes. | ||
### Rules for the icons: | ||
- Size should have at max 500px of width/height. | ||
- Place the icon accordingly with the grid. | ||
- Icons should be completely black. | ||
- Group the icon if it has several parts. | ||
- Make icons exportable to SVG. | ||
- Name your icon (layer/group) according to the pattern `icon-font_xx_Name`, where xx is a unique integer (increase it for each new icon). | ||
### When you're done with changes | ||
- Select all the icons, and export them to `app/assets/fonts/icon_font/svgs` folder (option should be visible in the bottom corner in your Sketch app): | ||
- ![screen shot 2015-01-16 at 11 40 36](https://cloud.githubusercontent.com/assets/978461/5774986/93dc90e8-9d74-11e4-8064-a478e55d392b.png) | ||
- Take into account that ```svgs``` folder is ignored. | ||
- Open your terminal app and go to the CartoDB root folder. | ||
- Install your node dependencies: `npm install` | ||
- Now we will generate the new icon fonts + stylesheet. Just run: `./node_modules/.bin/gulp` | ||
- Check that your `icon-font.css.scss` and the `cartoIcon` fonts have been edited: | ||
- ![screen shot 2015-01-16 at 11 02 53](https://cloud.githubusercontent.com/assets/978461/5775004/acf10faa-9d74-11e4-893c-790da626d894.png) | ||
All done! |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1746705
133
264
4
39