Skip to content

Commit

Permalink
Refactors icon set template to ES2016.
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador committed May 7, 2016
1 parent a527d58 commit bd0084f
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 54 deletions.
9 changes: 3 additions & 6 deletions Entypo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* Entypo icon set component.
* Usage: <Entypo name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule Entypo
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"500px": 61696,
"500px-with-circle": 61697,
"add-to-list": 61698,
Expand Down Expand Up @@ -421,7 +418,7 @@ var glyphMap = {
"youtube-with-circle": 62106
};

var Entypo = createIconSet(glyphMap, 'Entypo', 'Entypo.ttf');
let Entypo = createIconSet(glyphMap, 'Entypo', 'Entypo.ttf');

module.exports = Entypo;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions EvilIcons.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* EvilIcons icon set component.
* Usage: <EvilIcons name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule EvilIcons
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"archive": 61696,
"arrow-down": 61697,
"arrow-left": 61698,
Expand Down Expand Up @@ -80,7 +77,7 @@ var glyphMap = {
"user": 61765
};

var EvilIcons = createIconSet(glyphMap, 'EvilIcons', 'EvilIcons.ttf');
let EvilIcons = createIconSet(glyphMap, 'EvilIcons', 'EvilIcons.ttf');

module.exports = EvilIcons;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions FontAwesome.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* FontAwesome icon set component.
* Usage: <FontAwesome name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule FontAwesome
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"glass": 61440,
"music": 61441,
"search": 61442,
Expand Down Expand Up @@ -731,7 +728,7 @@ var glyphMap = {
"snapchat-square": 62125
};

var FontAwesome = createIconSet(glyphMap, 'FontAwesome', 'FontAwesome.ttf');
let FontAwesome = createIconSet(glyphMap, 'FontAwesome', 'FontAwesome.ttf');

module.exports = FontAwesome;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions Foundation.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* Foundation icon set component.
* Usage: <Foundation name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule Foundation
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"address-book": 61696,
"alert": 61697,
"align-center": 61698,
Expand Down Expand Up @@ -293,7 +290,7 @@ var glyphMap = {
"zoom-out": 61978
};

var Foundation = createIconSet(glyphMap, 'fontcustom', 'Foundation.ttf');
let Foundation = createIconSet(glyphMap, 'fontcustom', 'Foundation.ttf');

module.exports = Foundation;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions Ionicons.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* Ionicons icon set component.
* Usage: <Ionicons name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule Ionicons
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"alert": 61697,
"alert-circled": 61696,
"android-add": 62151,
Expand Down Expand Up @@ -743,7 +740,7 @@ var glyphMap = {
"xbox": 62220
};

var Ionicons = createIconSet(glyphMap, 'Ionicons', 'Ionicons.ttf');
let Ionicons = createIconSet(glyphMap, 'Ionicons', 'Ionicons.ttf');

module.exports = Ionicons;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions MaterialIcons.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* MaterialIcons icon set component.
* Usage: <MaterialIcons name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule MaterialIcons
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"3d-rotation": 59469,
"ac-unit": 60219,
"access-alarm": 57744,
Expand Down Expand Up @@ -942,7 +939,7 @@ var glyphMap = {
"zoom-out-map": 58731
};

var MaterialIcons = createIconSet(glyphMap, 'Material Icons', 'MaterialIcons.ttf');
let MaterialIcons = createIconSet(glyphMap, 'Material Icons', 'MaterialIcons.ttf');

module.exports = MaterialIcons;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions Octicons.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* Octicons icon set component.
* Usage: <Octicons name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule Octicons
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"alert": 61485,
"arrow-down": 61503,
"arrow-left": 61504,
Expand Down Expand Up @@ -205,7 +202,7 @@ var glyphMap = {
"x": 61569
};

var Octicons = createIconSet(glyphMap, 'octicons', 'Octicons.ttf');
let Octicons = createIconSet(glyphMap, 'octicons', 'Octicons.ttf');

module.exports = Octicons;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions Zocial.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/**
* Zocial icon set component.
* Usage: <Zocial name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule Zocial
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = {
import createIconSet from './lib/create-icon-set';
const glyphMap = {
"acrobat": 61696,
"amazon": 61697,
"android": 61698,
Expand Down Expand Up @@ -110,7 +107,7 @@ var glyphMap = {
"youtube": 61795
};

var Zocial = createIconSet(glyphMap, 'zocial', 'Zocial.ttf');
let Zocial = createIconSet(glyphMap, 'zocial', 'Zocial.ttf');

module.exports = Zocial;
module.exports.glyphMap = glyphMap;
Expand Down
9 changes: 3 additions & 6 deletions template/iconSet.tpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
/**
* ${componentName} icon set component.
* Usage: <${componentName} name="icon-name" size={20} color="#4F8EF7" />
*
* @providesModule ${componentName}
*/
'use strict';

var createIconSet = require('./lib/create-icon-set');
var glyphMap = ${glyphMap};
import createIconSet from './lib/create-icon-set';
const glyphMap = ${glyphMap};

var ${componentName} = createIconSet(glyphMap, '${fontFamily}', '${componentName}.ttf');
let ${componentName} = createIconSet(glyphMap, '${fontFamily}', '${componentName}.ttf');

module.exports = ${componentName};
module.exports.glyphMap = glyphMap;

0 comments on commit bd0084f

Please sign in to comment.