Skip to content

Commit

Permalink
Update to RNVI 6
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Oct 3, 2018
1 parent c8abbb7 commit bf49299
Show file tree
Hide file tree
Showing 87 changed files with 9,613 additions and 14,269 deletions.
4 changes: 4 additions & 0 deletions AntDesign.js
@@ -0,0 +1,4 @@
import glyphMap from './vendor/react-native-vector-icons/glyphmaps/AntDesign.json';
import createIconSet from './createIconSet';

export default createIconSet(glyphMap, 'anticon', require('./fonts/AntDesign.ttf'));
Binary file added fonts/AntDesign.ttf
Binary file not shown.
Binary file modified fonts/FontAwesome5_Brands.ttf
Binary file not shown.
Binary file modified fonts/FontAwesome5_Regular.ttf
Binary file not shown.
Binary file modified fonts/FontAwesome5_Solid.ttf
Binary file not shown.
Binary file modified fonts/MaterialCommunityIcons.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions index.js
@@ -1,4 +1,7 @@
module.exports = {
get AntDesign() {
return require('./AntDesign').default;
},
get Entypo() {
return require('./Entypo').default;
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@expo/vector-icons",
"version": "7.0.0-rc.0",
"version": "7.0.0",
"description": "Built-in support for 10 popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.",
"main": "index.js",
"scripts": {},
Expand All @@ -19,7 +19,7 @@
"homepage": "https://expo.github.io/vector-icons",
"dependencies": {
"lodash": "^4.17.4",
"react-native-vector-icons": "5.0.0"
"react-native-vector-icons": "6.0.0"
},
"peerDependencies": {
"expo-font": "^1.0.0"
Expand Down
5 changes: 5 additions & 0 deletions vendor/react-native-vector-icons/.eslintrc
Expand Up @@ -9,6 +9,11 @@
"prettier"
],
"parser": "babel-eslint",
"settings": {
"import/ignore": [
"lib/react-native.js"
]
},
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/require-default-props": [0],
Expand Down
18 changes: 18 additions & 0 deletions vendor/react-native-vector-icons/AntDesign.js
@@ -0,0 +1,18 @@
/**
* AntDesign icon set component.
* Usage: <AntDesign name="icon-name" size={20} color="#4F8EF7" />
*/

import createIconSet from './lib/create-icon-set';
import glyphMap from './glyphmaps/AntDesign.json';

const iconSet = createIconSet(glyphMap, 'anticon', 'AntDesign.ttf');

export default iconSet;

export const Button = iconSet.Button;
export const TabBarItem = iconSet.TabBarItem;
export const TabBarItemIOS = iconSet.TabBarItemIOS;
export const ToolbarAndroid = iconSet.ToolbarAndroid;
export const getImageSource = iconSet.getImageSource;

Binary file not shown.
Binary file not shown.
Binary file modified vendor/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf
Binary file not shown.
Binary file modified vendor/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf
Binary file not shown.
Binary file not shown.
51 changes: 43 additions & 8 deletions vendor/react-native-vector-icons/README.md
Expand Up @@ -4,19 +4,43 @@

Perfect for buttons, logos and nav/tab bars. Easy to extend, style and integrate into your project.

## Table of Contents
- [Bundeled Icon Sets](#bundled-icon-sets)
- [Installation](#installation)
- [iOS](#ios)
- [Android](#android)
- [OSX](#osx-via-react-native-desktop)
- [Windows](#windows-via-react-native-windows)
- [Web](#web-with-webpack)
- [Upgrading](#upgrading)
- [Icon Component](#icon-component)
- [Icon.Button Component](#iconbutton-component)
- [Usage as PNG image/source object](#usage-as-png-imagesource-object)
- [Usage with TabBarIOS](#usage-with-tabbarios)
- [Usage with NavigatorIOS](#usage-with-navigatorios)
- [Usage with ToolbarAndroid](#usage-with-toolbarandroid)
- [Custom Fonts](#custom-fonts)
- [Animation](#animation)
- [Examples](#examples)
- [Generating your own icon set from a CSS file](#generating-your-own-icon-set-from-a-css-file)
- [Changelog](#changelog)
- [Troubleshooting](#troubleshooting)
- [License](#license)

## Bundled Icon Sets

[Browse all](https://oblador.github.io/react-native-vector-icons/).

* [`AntDesign`](https://ant.design/) by AntFinance (**297** icons)
* [`Entypo`](http://entypo.com) by Daniel Bruce (**411** icons)
* [`EvilIcons`](http://evil-icons.io) by Alexander Madyankin & Roman Shamin (v1.10.1, **70** icons)
* [`Feather`](http://feathericons.com) by Cole Bemis & Contributors (v4.7.0, **266** icons)
* [`FontAwesome`](http://fortawesome.github.io/Font-Awesome/icons/) by Dave Gandy (v4.7.0, **675** icons)
* [`FontAwesome 5`](https://fontawesome.com) by Fonticons, Inc. (v5.2.0, 1295 (free) **2357** (pro) icons)
* [`FontAwesome 5`](https://fontawesome.com) by Fonticons, Inc. (v5.3.1, 1341 (free) **3978** (pro) icons)
* [`Foundation`](http://zurb.com/playground/foundation-icon-fonts-3) by ZURB, Inc. (v3.0, **283** icons)
* [`Ionicons`](https://ionicons.com/) by Ben Sperry (v4.2.4, **696** icons)
* [`MaterialIcons`](https://www.google.com/design/icons/) by Google, Inc. (v3.0.1, **932** icons)
* [`MaterialCommunityIcons`](https://materialdesignicons.com/) by MaterialDesignIcons.com (v2.5.94, **2595** icons)
* [`MaterialCommunityIcons`](https://materialdesignicons.com/) by MaterialDesignIcons.com (v2.8.94, **2894** icons)
* [`Octicons`](http://octicons.github.com) by Github, Inc. (v8.0.0, **177** icons)
* [`Zocial`](http://zocial.smcllns.com/) by Sam Collins (v1.0, **100** icons)
* [`SimpleLineIcons`](http://simplelineicons.com/) by Sabbir & Contributors (v2.4.1, **189** icons)
Expand Down Expand Up @@ -44,7 +68,7 @@ If you want to use the TabBar/NavigatorIOS integration or use `getImageSource`,

#### Option: With `react-native link`

`$ react-native link`
`$ react-native link react-native-vector-icons`

*Note: Some users are having trouble using this method, try one of the others if you are too.*

Expand Down Expand Up @@ -202,6 +226,9 @@ if (style.styleSheet) {
document.head.appendChild(style);
```

## Upgrading
Upgrading this package often requires the font files linked to your projects to be updated as well. If the automatic linking works for you, running this again should update the fonts. Otherwise you need to follow the steps outlined in the [installation](#installation) section.

## `Icon` Component
You can either use one of the bundled icons above or roll your own custom font.

Expand Down Expand Up @@ -343,12 +370,12 @@ For example usage see `Examples/IconExplorer/index.android.js`or the examples se
## Custom Fonts

### `createIconSet(glyphMap, fontFamily[, fontFile])`
Returns your own custom font based on the `glyphMap` where the key is the icon name and the value is either a UTF-8 character or it's character code. `fontFamily` is the name of the font **NOT** the filename. Open the font in Font Book.app or similar to learn the name. Optionally pass the third `fontFile` argument for android support, it should be a path to the font file in you asset folder.
Returns your own custom font based on the `glyphMap` where the key is the icon name and the value is either a UTF-8 character or it's character code. `fontFamily` is the name of the font **NOT** the filename. Open the font in Font Book.app or similar to learn the name. Optionally pass the third `fontFile` argument for android support, it should be the custom font file name.

```js
import { createIconSet } from 'react-native-vector-icons';
const glyphMap = { 'icon-name': 1234, test: '' };
const Icon = createIconSet(glyphMap, 'FontName');
const Icon = createIconSet(glyphMap, 'FontName', 'font-name.ttf');
```

### `createIconSetFromFontello(config[, fontFamily[, fontFile]])`
Expand All @@ -364,10 +391,10 @@ const Icon = createIconSetFromFontello(fontelloConfig);
```js
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
import icoMoonConfig from './selection.json';
const Icon = createIconSetFromIcoMoon(icoMoonConfig);
const Icon = createIconSetFromIcoMoon(icoMoonConfig, 'LineAwesome', 'line-awesome.ttf');
```

Make sure you're using the _Download_ option in IcoMoon, and use the `.json` file that's included in the `.zip` you've downloaded. You'll also need to import the `.ttf` font file into your project, following the instructions above.
Make sure you're using the _Download_ option in [IcoMoon](https://icomoon.io/app), and use the `.json` file that's included in the `.zip` you've downloaded. You'll also need to import the `.ttf` font file into your project, following the instructions above.
#### iOS
You have to manually make a reference of your `.ttf` on your xcodeproj `Resources` folder.

Expand Down Expand Up @@ -495,7 +522,15 @@ Save output to file, defaults to STDOUT

#### Android build fails on Windows for no good reason

Both npm and android file hierarchies tend to get very deep and even worse when you combine them. Since Windows file system has a max length, long file name addresses will result in numerous errors including `Execution failed for task ':react-native-vector-icons:processReleaseResources'`. So try to keep the path to your project folder as short as possible.
Both npm and android file hierarchies tend to get very deep and even worse when you combine them. Since Windows file system has a max length, long file name addresses will result in numerous errors including `Execution failed for task ':react-native-vector-icons:processReleaseResources'`. So try to keep the path to your project folder as short as possible.

#### Wrong icons are shown after upgrading this package

You probably didn't update the font files linked to your native project after upgrading. However, this only applies to Android targets since iOS bundles the fonts when building the app (try to clean your build from Xcode if the problem exists). On android you can relink the project or you manually update the fonts. To have them automatically synced use the [gradle approach](https://github.com/oblador/react-native-vector-icons#option-with-gradle-recommended).

#### Some icons are missing after upgrading this package

Sometimes vendors decides to remove some icons from newer releases, this has nothing to do with this package. If you depend on an older version of a font you can add it as a [custom font](#custom-fonts).

## License

Expand Down
2 changes: 1 addition & 1 deletion vendor/react-native-vector-icons/RNVectorIcons.podspec
Expand Up @@ -9,7 +9,7 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/oblador/react-native-vector-icons"
s.license = "MIT"
s.author = { "Joel Arvidsson" => "joel@oblador.se" }
s.platform = :ios, "7.0"
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/oblador/react-native-vector-icons.git", :tag => "v#{s.version}" }
s.source_files = 'RNVectorIconsManager/**/*.{h,m}'
s.resources = "Fonts/*.ttf"
Expand Down
4 changes: 3 additions & 1 deletion vendor/react-native-vector-icons/bin/add-font-assets.js
Expand Up @@ -2,8 +2,10 @@
/* eslint-disable no-console */

const fs = require('fs');
const path = require('path');

const json = require('../../package.json');
/* eslint-disable import/no-dynamic-require */
const json = require(path.resolve('./package.json'));

if (!json.rnpm) {
json.rnpm = {
Expand Down
Expand Up @@ -2,8 +2,9 @@
/* eslint-disable no-console */

const fs = require('fs');
const yargs = require('yargs');

const argv = require('yargs')
const { argv } = yargs
.usage('')
.option('path', {
alias: 'p',
Expand All @@ -14,7 +15,7 @@ const argv = require('yargs')
string: true,
})
.demandOption('path')
.demandOption('output').argv;
.demandOption('output');

const path = `${argv.path}/svgs/`;

Expand Down
6 changes: 4 additions & 2 deletions vendor/react-native-vector-icons/bin/generate-icon.js
Expand Up @@ -4,8 +4,10 @@
const _ = require('lodash');
const fs = require('fs');
const path = require('path');
const yargs = require('yargs');
const generateIconSetFromCss = require('../lib/generate-icon-set-from-css');
const argv = require('yargs')

const { argv } = yargs
.usage(
'Usage: $0 [options] path/to/styles.css \nFor default template please provide --componentName and --fontFamily'
)
Expand All @@ -19,7 +21,7 @@ const argv = require('yargs')
.describe('o', 'Save output to file, defaults to STDOUT')
.alias('o', 'output')
.describe('g', 'Save glyphmap JSON to file')
.alias('g', 'glyphmap').argv;
.alias('g', 'glyphmap');

let template;
if (argv.template) {
Expand Down
Expand Up @@ -4,7 +4,9 @@
const _ = require('lodash');
const fs = require('fs');
const path = require('path');
const argv = require('yargs')
const yargs = require('yargs');

const { argv } = yargs
.usage(
'Usage: $0 [options] path/to/codepoints \nFor default template please provide --componentName and --fontFamily'
)
Expand All @@ -15,7 +17,7 @@ const argv = require('yargs')
.describe('o', 'Save output to file, defaults to STDOUT')
.alias('o', 'output')
.describe('g', 'Save glyphmap JSON to file')
.alias('g', 'glyphmap').argv;
.alias('g', 'glyphmap');

function extractGlyphMapFromCodepoints(fileName) {
const codepoints = fs
Expand Down
1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/Entypo.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/EvilIcons.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/Feather.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/FontAwesome.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/FontAwesome5.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/FontAwesome5Pro.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/Foundation.js

This file was deleted.

1 change: 0 additions & 1 deletion vendor/react-native-vector-icons/dist/Ionicons.js

This file was deleted.

0 comments on commit bf49299

Please sign in to comment.