forked from oblador/react-native-vector-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FontAwesome 5 with fallback (oblador#787)
* FontAwesome5 implementation + GlyphMap for FontAwesome 5.1.0 Pro + Font files for FontAwesome 5.1.0 Free + Implementation enabling FontAwesome5 icons Handles the copying and renaming of FontAwesome5 Pro font files Removed debug code * Update README.md * Easier way to use FontAwesome5 Pro Now a default import from a separate file, instead of creating it using FA5iconSet(bool). * FontAwesome 5 instructions Fixes to pass tests * Automatic build and upgrading, also added to directory and IconExplorer * Buttons and TabBarItems should be working on iOS too now * Updated build flow + FontAwesome 5.1.1 + Temporary folder and npm pack when building + Separate glyphmaps * Upgrading FontAwesome is automatic and occurs locally * Create FontAwesome 5 iconSet with factory * Setup FontAwesome 5 automatically * Bug fixes with FontAwesome 5 loading * getImageSource() implementation for FontAwesome 5 * Export all types in FontAwesome5 iconSets * Changed name on FA5Type to FA5Style * Update docs to reflect changes to FontAwesome 5 * Some final iOS fixes for FontAwesome 5 PR * Updated scripts * Name changes and minor fixes * ensureNativeModuleAvailable() in its own file * Removed add-font-assets from user binaries * Edited package.json ends with blank line now * Cleaner code * Docs update * FontAwesome5 script now generates metadata * yarn test * Implement fallback * IconExplorer fix * directory now has custom fallback * Merge updates * Should remove project.pbxproj from PR * Upgrade FontAwesome 5 to 5.2.0 * Invert metadata * Implement fallback * eslint corrections * Fix directory * Removed brand prop and optional fallback * Changes how FontAwesome5 metadata is generated
- Loading branch information
1 parent
296a32e
commit 4aa125f
Showing
15 changed files
with
5,277 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable no-console */ | ||
|
||
const fs = require('fs'); | ||
|
||
const argv = require('yargs') | ||
.usage('') | ||
.option('path', { | ||
alias: 'p', | ||
string: true, | ||
}) | ||
.option('output', { | ||
alias: 'o', | ||
string: true, | ||
}) | ||
.demandOption('path') | ||
.demandOption('output').argv; | ||
|
||
const path = `${argv.path}/svgs/`; | ||
|
||
const generatedJSON = {}; | ||
fs.readdirSync(path) | ||
.filter(file => fs.statSync(path + file).isDirectory()) | ||
.forEach(file => { | ||
const icons = fs.readdirSync(path + file); | ||
generatedJSON[file] = icons.map(icon => icon.split('.')[0]); | ||
}); | ||
|
||
fs.writeFileSync( | ||
argv.output, | ||
`${JSON.stringify(generatedJSON, null, 2)}\r\n`, | ||
'utf8' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.