forked from reactnativecn/react-native-website
-
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.
- Loading branch information
0 parents
commit 6e3ee98
Showing
1,159 changed files
with
261,059 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
aliases: | ||
- &restore-cache | ||
keys: | ||
- v1-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "website/package.json" }} | ||
# Fallback in case checksum fails | ||
- v1-dependencies-{{ arch }}-{{ .Branch }}- | ||
|
||
- &save-cache | ||
paths: | ||
- website/node_modules | ||
key: v1-dependencies-{{ arch }}-{{ .Branch }}-{{ checksum "website/package.json" }} | ||
|
||
- &filter-only-master | ||
branches: | ||
only: | ||
- master | ||
|
||
- &filter-ignore-gh-pages | ||
branches: | ||
ignore: gh-pages | ||
|
||
defaults: &defaults | ||
working_directory: ~/react-native-website | ||
docker: | ||
- image: circleci/node:8 | ||
|
||
version: 2 | ||
jobs: | ||
# Tests website | ||
test-website: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Dependencies | ||
command: | | ||
cd website | ||
yarn --no-progress | ||
- run: | ||
name: Test Website | ||
command: | | ||
cd website | ||
yarn test | ||
# Deploys website | ||
deploy-website: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Dependencies | ||
command: | | ||
cd website | ||
yarn --no-progress | ||
- run: | ||
name: Build and Deploy Static Website | ||
command: | | ||
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Website Deployment Script" | ||
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" > ~/.netrc | ||
echo "Deploying website..." | ||
cd website && GIT_USER=reactjs-bot CIRCLE_PROJECT_REPONAME=react-native yarn run publish-gh-pages | ||
else | ||
echo "Skipping deploy." | ||
fi | ||
# Workflows enables us to run multiple jobs in parallel | ||
workflows: | ||
version: 2 | ||
|
||
build: | ||
jobs: | ||
# Test website | ||
- test-website: | ||
filters: *filter-ignore-gh-pages | ||
|
||
# If we are on master, deploy docs | ||
- deploy-website: | ||
filters: *filter-only-master | ||
requires: | ||
- test-website |
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,9 @@ | ||
Thank you for the PR! Contributors like you keep React Native awesome! | ||
|
||
Please see the Contribution Guide for guidelines: | ||
|
||
https://github.com/facebook/react-native-website/blob/master/CONTRIBUTING.md | ||
|
||
If your PR references an existing issue, please add the issue number below: | ||
|
||
#<Issue> |
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,13 @@ | ||
node_modules | ||
.DS_Store | ||
lib/core/metadata.js | ||
lib/core/MetadataBlog.js | ||
website/translated_docs | ||
website/build/ | ||
website/yarn.lock | ||
website/node_modules | ||
|
||
website/i18n/* | ||
!website/i18n/en.json | ||
|
||
.nvmrc |
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,100 @@ | ||
# [Open Source Code of Conduct](https://code.facebook.com/codeofconduct) | ||
|
||
This code of conduct outlines our expectations for participants within the | ||
**Facebook Open Source** community, as well as steps to reporting unacceptable | ||
behavior. We are committed to providing a welcoming and inspiring community for | ||
all and expect our code of conduct to be honored. Anyone who violates this code | ||
of conduct may be banned from the community. | ||
|
||
Our open source community strives to: | ||
|
||
* **Be friendly and patient.** | ||
* **Be welcoming:** We strive to be a community that welcomes and supports | ||
people of all backgrounds and identities. This includes, but is not limited to | ||
members of any race, ethnicity, culture, national origin, colour, immigration | ||
status, social and economic class, educational level, sex, sexual orientation, | ||
gender identity and expression, age, size, family status, political belief, | ||
religion, and mental and physical ability. | ||
* **Be considerate:** Your work will be used by other people, and you in turn | ||
will depend on the work of others. Any decision you take will affect users and | ||
colleagues, and you should take those consequences into account when making | ||
decisions. Remember that we’re a world-wide community, so you might not be | ||
communicating in someone else’s primary language. | ||
* **Be respectful:** Not all of us will agree all the time, but disagreement is | ||
no excuse for poor behavior and poor manners. We might all experience some | ||
frustration now and then, but we cannot allow that frustration to turn into a | ||
personal attack. It’s important to remember that a community where people feel | ||
uncomfortable or threatened is not a productive one. | ||
* **Be careful in the words that you choose:** we are a community of | ||
professionals, and we conduct ourselves professionally. Be kind to others. Do | ||
not insult or put down other participants. Harassment and other exclusionary | ||
behavior aren’t acceptable. This includes, but is not limited to: | ||
* Violent threats or language directed against another person. | ||
* Discriminatory jokes and language. | ||
* Posting sexually explicit or violent material. | ||
* Posting (or threatening to post) other people’s personally identifying | ||
information (“doxing”). | ||
* Personal insults, especially those using racist or sexist terms. | ||
* Unwelcome sexual attention. | ||
* Advocating for, or encouraging, any of the above behavior. | ||
* Repeated harassment of others. In general, if someone asks you to stop, then | ||
stop. | ||
* **When we disagree, try to understand why:** Disagreements, both social and | ||
technical, happen all the time. It is important that we resolve disagreements | ||
and differing views constructively. | ||
* **Remember that we’re different.** The strength of our community comes from | ||
its diversity, people from a wide range of backgrounds. Different people have | ||
different perspectives on issues. Being unable to understand why someone holds | ||
a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to | ||
err and blaming each other doesn’t get us anywhere. Instead, focus on helping | ||
to resolve issues and learning from mistakes. | ||
|
||
This code is not exhaustive or complete. It serves to distill our common | ||
understanding of a collaborative, shared environment, and goals. We expect it to | ||
be followed in spirit as much as in the letter. | ||
|
||
## Diversity Statement | ||
|
||
We encourage everyone to participate and are committed to building a community | ||
for all. Although we may not be able to satisfy everyone, we all agree that | ||
everyone is equal. Whenever a participant has made a mistake, we expect them to | ||
take responsibility for it. If someone has been harmed or offended, it is our | ||
responsibility to listen carefully and respectfully, and do our best to right | ||
the wrong. | ||
|
||
Although this list cannot be exhaustive, we explicitly honor diversity in age, | ||
gender, gender identity or expression, culture, ethnicity, language, national | ||
origin, political beliefs, profession, race, religion, sexual orientation, | ||
socioeconomic status, and technical ability. We will not tolerate discrimination | ||
based on any of the protected characteristics above, including participants with | ||
disabilities. | ||
|
||
## Reporting Issues | ||
|
||
If you experience or witness unacceptable behavior—or have any other | ||
concerns—please report it by contacting us via [email protected]. All reports | ||
will be handled with discretion. In your report please include: | ||
|
||
* Your contact information. | ||
* Names (real, nicknames, or pseudonyms) of any individuals involved. If there | ||
are additional witnesses, please include them as well. Your account of what | ||
occurred, and if you believe the incident is ongoing. If there is a publicly | ||
available record (e.g. a mailing list archive or a public IRC logger), please | ||
include a link. | ||
* Any additional information that may be helpful. | ||
|
||
After filing a report, a representative will contact you personally. If the | ||
person who is harassing you is part of the response team, they will recuse | ||
themselves from handling your incident. A representative will then review the | ||
incident, follow up with any additional questions, and make a decision as to how | ||
to respond. We will respect confidentiality requests for the purpose of | ||
protecting victims of abuse. | ||
|
||
Anyone asked to stop unacceptable behavior is expected to comply immediately. If | ||
an individual engages in unacceptable behavior, the representative may take any | ||
action they deem appropriate, up to and including a permanent ban from our | ||
community without warning. | ||
|
||
_This Code Of Conduct follows the | ||
[template](http://todogroup.org/opencodeofconduct/) established by the | ||
[TODO Group](http://todogroup.org/)._ |
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,69 @@ | ||
# Contributing | ||
|
||
Thank you for your interest in contributing to the React Native Docs! | ||
|
||
## Code of Conduct | ||
|
||
Facebook has adopted a Code of Conduct that we expect project participants to | ||
adhere to. Please [read the full text](https://code.facebook.com/codeofconduct) | ||
so that you can understand what actions will and will not be tolerated. | ||
|
||
## Guidelines for Text | ||
|
||
**Different sections intentionally have different styles.** | ||
|
||
The documentation is divided into sections to cater to different learning styles | ||
and use cases. When editing an article, try to match the surrounding text in | ||
tone and style. When creating a new article, try to match the tone of the other | ||
articles in the same section. Learn about the motivation behind each section | ||
below. | ||
|
||
**[Getting Started](https://facebook.github.io/react-native/docs/tutorial.html)** | ||
is relatively informal. Resist adding too much detail to the Quick Start. The | ||
native code instructions should contain the minimal set of steps to get to a | ||
working development environment, and is expected to contain a longer set of | ||
steps to get a working development environment. Whatever the case, it should be | ||
possible for a beginner to mechanically follow every instruction, and still get | ||
to a working React Native app. | ||
|
||
**[The Basics](https://facebook.github.io/react-native/docs/tutorial.html)** is | ||
designed to introduce fundamental concepts in a step-by-step way. Each | ||
individual article in The Basics builds on the knowledge from the previous ones, | ||
so make sure not to add any "cyclical dependencies" between them. It is | ||
important that the reader can start with the first article and work their way to | ||
the last Basics article without ever having to "look ahead" for a definition. | ||
This explains some ordering choices. Resist adding too much detail to Basics | ||
articles. They intentionally don't cover all corner cases, and focus on | ||
establishing firm foundations. | ||
|
||
**[Guides](https://facebook.github.io/react-native/docs/components-and-apis.html)** | ||
are deep dives into topics that aren't essential for a beginner developer but | ||
that everyone bumps into sooner or later. They don't have a specific order, and | ||
target more experienced developers. If you have a set of recipes fitting a | ||
particular use case, and those recipes aren't opinionated (most React Native | ||
users would agree on them), this is the place to add them. | ||
|
||
**[Reference](https://facebook.github.io/react-native/docs/activityindicator.html)** | ||
is organized by APIs rather than concepts. It is intended to be exhaustive. Any | ||
corner cases or recommendations that were skipped for brevity in The Basics or | ||
Guides should be mentioned in the reference documentation for the corresponding | ||
APIs. | ||
|
||
**[Contributing](https://facebook.github.io/react-native/docs/contributing.html)** | ||
should stay up-to-date and be friendly to relatively experienced developers. | ||
|
||
**[More Resources](https://facebook.github.io/react-native/docs/more-resources.html)** | ||
has a more conversational tone than the other sections. Here, it's fine to | ||
include some content that's not primarily concerned with React Native, as long | ||
as React Native users are overwhelmingly interested in it (e.g. recommendations | ||
on which libraries to use). | ||
|
||
**Try to follow your own instructions.** | ||
|
||
When writing step-by-step instructions (e.g. how to install something), try to | ||
forget everything you know about the topic, and actually follow the instructions | ||
you wrote, a single step at time. Often you will discover that there is implicit | ||
knowledge that you forgot to mention, or that there are missing or out-of-order | ||
steps in the instructions. Bonus points for getting _somebody else_ to follow | ||
the steps and watching what they struggle with. Often it would be something very | ||
simple that you have not anticipated. |
Oops, something went wrong.