https://github.com/draftbit/re-font-awesome
ReasonML bindings to Font Awesome Pro
https://github.com/draftbit/re-font-awesome
font-awesome font-awesome-5 reasonml reasonml-bindings rescript rescript-bindings
Last synced: 8 months ago
JSON representation
ReasonML bindings to Font Awesome Pro
- Host: GitHub
- URL: https://github.com/draftbit/re-font-awesome
- Owner: draftbit
- Created: 2020-09-25T17:05:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-21T18:01:29.000Z (9 months ago)
- Last Synced: 2025-04-29T09:02:08.511Z (9 months ago)
- Topics: font-awesome, font-awesome-5, reasonml, reasonml-bindings, rescript, rescript-bindings
- Language: CSS
- Homepage:
- Size: 857 KB
- Stars: 16
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - re-font-awesome
README
# Font Awesome in Rescript
## Usage
```reason
// Free libraries
// Pro libraries (requires a font-awesome token, see below)
```
## Installation & dependencies
This library uses optional dependencies for the individual font libraries, so make sure you include the ones you want to use in your project. For example:
```
$ yarn add '@fortawesome/pro-regular-svg-icons@^5'
$ yarn add '@fortawesome/free-solid-svg-icons@^5'
```
_NOTE:_ In order to use the `-pro` libraries you must have a token for font awesome in your `.npmrc`. As an example:
```
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
```
## Generate the binding files
The reason bindings for each font style are generated by a script `genbindings.js`, which you can run directly or with:
```
yarn gen-icon-bindings
```
This should be run any time the FontAwesome version changes, to keep the list of icons up to date.
## Preview Example
A small React application is provided to preview the icons and serve as an example of how to use the components. Its code lives in the `example` directory. It can be run with `yarn example:start` and will be run on port `1234` by default.
## Compiler Commands
```
yarn re:clean
yarn re:build
yarn re:watch
```