Skip to content

Commit

Permalink
Migrated to standalone script to generate icon sets and embed the `gl…
Browse files Browse the repository at this point in the history
…yphMap` by default.
  • Loading branch information
oblador committed May 17, 2015
1 parent 25656a7 commit 38955a4
Show file tree
Hide file tree
Showing 25 changed files with 3,002 additions and 3,029 deletions.
416 changes: 415 additions & 1 deletion Entypo.js

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions Examples/IconExplorer/IconSetList.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,43 @@ var _ = require('lodash');

var IconList = require('./IconList');
var SocialButton = require('./SocialButton');
var Icon = require('react-native-vector-icons/FontAwesome');
var Entypo = require('react-native-vector-icons/Entypo');
var FontAwesome = require('react-native-vector-icons/FontAwesome');
var Foundation = require('react-native-vector-icons/Foundation');
var Ionicons = require('react-native-vector-icons/Ionicons');
var MaterialDesign = require('react-native-vector-icons/MaterialDesign');
var Zocial = require('react-native-vector-icons/Zocial');

var ICON_SETS = [
{
name: 'Entypo',
component: require('react-native-vector-icons/Entypo'),
glyphs: require('react-native-vector-icons/glyph-maps/Entypo.json')
component: Entypo,
},
{
name: 'FontAwesome',
component: require('react-native-vector-icons/FontAwesome'),
glyphs: require('react-native-vector-icons/glyph-maps/FontAwesome.json')
component: FontAwesome,
},
{
name: 'Foundation',
component: require('react-native-vector-icons/Foundation'),
glyphs: require('react-native-vector-icons/glyph-maps/Foundation.json')
component: Foundation
},
{
name: 'Ionicons',
component: require('react-native-vector-icons/Ionicons'),
glyphs: require('react-native-vector-icons/glyph-maps/Ionicons.json')
component: Ionicons
},
{
name: 'MaterialDesign',
component: require('react-native-vector-icons/MaterialDesign'),
glyphs: require('react-native-vector-icons/glyph-maps/MaterialDesign.json')
component: MaterialDesign
},
{
name: 'Zocial',
component: require('react-native-vector-icons/Zocial'),
glyphs: require('react-native-vector-icons/glyph-maps/Zocial.json')
component: Zocial
},
].map(function(iconSet) {
// Some icons have multiple names, so group them by glyph
iconSet.glyphs = _.values(_.groupBy(Object.keys(iconSet.glyphs), function(name) {
return iconSet.glyphs[name];
var glyphMap = iconSet.component.glyphMap;
iconSet.glyphs = _.values(_.groupBy(Object.keys(glyphMap), function(name) {
return glyphMap[name];
}));
return iconSet;
});
Expand Down Expand Up @@ -163,7 +163,7 @@ var IconSetsList = React.createClass({
return (
<View>
<View style={styles.row}>
<Icon {...rowData} />
<FontAwesome {...rowData} />
</View>
<View style={styles.separator} />
</View>
Expand Down
2 changes: 1 addition & 1 deletion Examples/IconExplorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"dependencies": {
"lodash": "^3.8.0",
"react-native": "^0.4.4",
"react-native": "^0.4.0",
"react-native-vector-icons": "file:../../"
}
}
Loading

0 comments on commit 38955a4

Please sign in to comment.