Skip to content

Commit

Permalink
Add documentation and packaging config for initial release (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlwilkerson committed Oct 8, 2018
1 parent 71c7cb2 commit 59a04a4
Show file tree
Hide file tree
Showing 10 changed files with 365 additions and 34 deletions.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Describe the problem

<!--- What happened? What are you seeing? How did you arrive here? -->

### What did you expect?

<!--- How would you like this to work instead? -->

### Reproducible test case

<!--- Insert a URL to your test case -->

<!--- Describe any details about the test case that we need to know like "whatever you do, don't click the red button" -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### Describe the problem you'd like to see solved or task you'd like to see made easier

<!--- What steps or tasks are you trying to complete along the way? -->

### Is this in relation to an existing part of react-native-fontawesome or something new?

<!--- If so, what part of Font Awesome? -->

### What is 1 thing that we can do when building this feature that will guarantee that it is awesome?

<!--- e.g. make the API super-convenient -->

### Why would other react-native-fontawesome users care about this?

<!--- e.g. because everyone wants icons that fly -->

### On a scale of 1 (sometime in the future) to 10 (absolutely right now), how soon would you recommend we make this feature?

<!--- e.g. 5 - "while we're young" -->

### Feature request checklist

* [ ] This is a single feature (i.e. not a re-write of all of Font Awesome)
* [ ] The title starts with "Feature request: " and is followed by a clear feature name (Ex: `Feature request: moar cowbell`)
* [ ] I have [searched for existing issues](https://github.com/FortAwesome/react-native-fontawesome/issues) and to the best of my knowledge this is not a duplicate
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

---

## [0.0.1](https://github.com/FortAwesome/react-native-fontawesome/releases/tag/0.0.1) - 2018-10-08

### Added

- Initial, minimal implementation, based on [@fortawesome/react-fontawesome](https://github.com/FortAwesome/react-fontawesome/)
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <mailto:hello@fontawesome.com>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
This is the repository for the _official_ Font Awesome React Native component, _initialized_ by the team behind Font Awesome,
but intended to evolve over time with _community_ contributions.

# Ways to Contribute

## Ask a Question

Trying to figure out how to make it work? Or how to use it in your scenario?

1. Review the [README](README.md)
1. Get familiar with the documentation for the [SVG with JavaScript](https://fontawesome.com/how-to-use/svg-with-js) implementation,
the framework upon which this component is built. Sometimes the answers you need may be there.
1. Post any remaining questions on [StackOverflow](https://stackoverflow.com/questions/tagged/react-fontawesome) with the tag `react-native-fontawesome`.

## Report a Bug

1. Use [Expo Snack](https://snack.expo.io/) to create a reproduction of the unexpected behavior
1. [Open a new issue with this template](https://github.com/FortAwesome/react-native-fontawesome/issues/new?template=bug_report.md),
and be sure to include a link to the reproduction you made with Expo Snack.

## Submit a Pull Request

Add tests if you add code.

## Everything Else

* [Request a feature](https://github.com/FortAwesome/react-native-fontawesome/issues/new??title=Feature%20request:feature-name&template=feature_request.md)
* [Request a new icon](https://github.com/FortAwesome/Font-Awesome/issues/new?title=Icon%20request:%20icon-name&template=icon-request.md)

# Project Goals

1. Achieve and maintain feature parity with Font Awesome's [SVG with JavaScript](https://fontawesome.com/how-to-use/svg-with-js) method.

1. Keep with best practices in the React Native development community.

1. Stay current with major developments in React Native and `react-native-svg`

1. Maintain a reasonable level of consistency between this component and the
official Font Awesome [React component](https://github.com/FortAwesome/react-native-fontawesome).

1. Sharing responsibility: The Font Awesome team will continue to be involved in ongoing development, hoping to _propel_
the project's momentum as we make _our_ contributions, while minimizing any bottle-necking that may happen as we balance
our own priorities across various projects. Ideally, members of the community will enjoy lending a hand to help keep
the project moving forward by responding to issues, answering questions on StackOverflow, reviewing and merging pull
requests, and publishing npm updates.

# Code of Conduct

We'll contribute according to the [Code of Conduct](CODE_OF_CONDUCT.md).

# Wanted: Core Contributors

We're seeking core contributors to help drive this project. Core contributors:

1. Share these goals
1. Demonstrate competence through contributions
1. Contribute with conduct fitting with our code of conduct
1. Want to make this project awesome
19 changes: 19 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2018 Fonticons, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
134 changes: 134 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<a href="https://fontawesome.com">
<img align="right" width="100" height="100" alt="Official Javascript Component" src="https://img.fortawesome.com/349cfdf6/official-javascript-component.svg">
</a>

# react-native-fontawesome

[![npm](https://img.shields.io/npm/v/@fortawesome/react-native-fontawesome.svg?style=flat-square)](https://www.npmjs.com/package/@fortawesome/react-native-fontawesome)

> Font Awesome 5 React Native component using SVG with JS
<!-- toc -->

- [Introduction](#introduction)
+ [Upgrading Font Awesome?](#upgrading-font-awesome)
+ [Get started](#get-started)
+ [Learn about our new SVG implementation](#learn-about-our-new-svg-implementation)
- [Installation](#installation)
- [Add more styles or Pro icons](#add-more-styles-or-pro-icons)
- [or with Yarn](#or-with-yarn)
- [Frequent questions](#frequent-questions)
* [How do I import the same icon from two different styles?](#how-do-i-import-the-same-icon-from-two-different-styles)
* [I don't think tree-shaking is working; got any advice?](#i-dont-think-tree-shaking-is-working-got-any-advice)
- [How to Help](#how-to-help)
- [Contributors](#contributors)

<!-- tocstop -->

## Introduction

Hey there! We're glad you're here...

#### Upgrading Font Awesome?

If you've used Font Awesome in the past (version 4 or older) there are some
things that you should learn before you dive in.

> https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
#### Get started

This package is for integrating with React Native. If you aren't using React Native then it's
not going to help you. Head over to our "Get Started" page for some guidance.

> https://fontawesome.com/how-to-use/on-the-web/setup/getting-started
#### Learn about our new SVG implementation

This package, under the hood, uses SVG with JS and the `@fortawesome/fontawesome-svg-core` library. This implementation differs drastically from
the web fonts implementation that was used in version 4 and older of Font Awesome. You might head over there to learn about how it works.

> https://fontawesome.com/how-to-use/on-the-web/advanced/svg-javascript-core
## Installation

```
$ npm i --save react-native-svg # **
$ npm i --save @fortawesome/fontawesome-svg-core
$ npm i --save @fortawesome/free-solid-svg-icons
$ npm i --save @fortawesome/react-native-fontawesome
```

** `create-react-native-app` uses Expo, which bundles `reactive-native-svg`. So if you're using `create-reactive-native-app`
you shouldn't try to add `react-native-svg`. At the time of writing, `create-react-native-app` bundles
`react-native-svg` version 6, which does not include support for SVG features such as `Mask`. Therefore, this
component does not yet support `Mask`.

## Add more styles or Pro icons

Brands are separated into their own style and for customers upgrading from
version 4 to 5 we have a limited number of Regular icons available.

**Visit [fontawesome.com/icons](https://fontawesome.com/icons) to search for free and Pro icons**

```
$ npm i --save @fortawesome/free-brands-svg-icons
$ npm i --save @fortawesome/free-regular-svg-icons
```

If you are a [Font Awesome Pro](https://fontawesome.com/pro) subscriber you can install Pro packages; this requires [additional configuration](https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers).

```
$ npm i --save @fortawesome/pro-solid-svg-icons
$ npm i --save @fortawesome/pro-regular-svg-icons
$ npm i --save @fortawesome/pro-light-svg-icons
```

## or with Yarn

```
$ yarn add @fortawesome/fontawesome-svg-core
$ yarn add @fortawesome/free-solid-svg-icons
$ yarn add @fortawesome/react-native-fontawesome
```

## Frequent questions

### How do I import the same icon from two different styles?

With ES modules and `import` statements we can rename:

```javascript
import { library } from '@fortawesome/fontawesome-svg-core'
import { faStroopwafel as fasFaStroopwafel } from '@fortawesome/pro-solid-svg-icons'
import { faStroopwafel as farFaStroopwafel } from '@fortawesome/pro-regular-svg-icons'

library.add(fasFaStroopwafel, farFaStroopwafel)
```

### I don't think tree-shaking is working; got any advice?

Check out our [docs here](https://fontawesome.com/how-to-use/with-the-api/other/tree-shaking).

## How to Help

Review the following docs before diving in:

- [CONTRIBUTING.md](CONTRIBUTING.md)
- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)

And then:

1. Check the existing issues and see if you can help!

## Contributors

The Font Awesome team:

| | Name | GitHub |
| :--------------------------------------------------------: | -------------- | -------------------------------------------------- |
| <img src="https://github.com/supercodepoet.png?size=72" /> | Travis Chase | [@supercodepoet](https://github.com/supercodepoet) |
| <img src="https://github.com/robmadole.png?size=72" /> | Rob Madole | [@robmadole](https://github.com/robmadole) |
| <img src="https://github.com/mlwilkerson.png?size=72" /> | Mike Wilkerson | [@mlwilkerson](https://github.com/mlwilkerson) |
| <img src="https://github.com/talbs.png?size=72" /> | Brian Talbot | [@talbs](https://github.com/talbs) |

6 changes: 2 additions & 4 deletions examples/Hello/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.4",
"@fortawesome/free-solid-svg-icons": "^5.3.1",
"@fortawesome/react-native-fontawesome": "git+ssh://git@github.com/FortAwesome/react-native-fontawesome#dev",
"@fortawesome/react-native-fontawesome": "https://github.com/FortAwesome/react-native-fontawesome.git",
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-fontawesome": "git+ssh://git@github.com/FortAwesome/react-native-fontawesome#dev",
"react-native-svg": "^7.0.3"
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz"
}
}
Loading

0 comments on commit 59a04a4

Please sign in to comment.