added pr files
Родитель
42576ffd96
Коммит
12cc4fe674
|
@ -0,0 +1,13 @@
|
|||
# CLA
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License
|
||||
Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For
|
||||
details, visit https://cla.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate
|
||||
the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to
|
||||
do this once across all repositories using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
|
||||
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
4
Home.md
4
Home.md
|
@ -1,3 +1,5 @@
|
|||
Welcome to the FluidFramework wiki! We're glad you're here!
|
||||
|
||||
Here you'll find all kinds of details info about working in this repo as a contributor, such as how the build script works, best practices for PRs, and how the code is structured.
|
||||
Here you'll find all kinds of details info about working in this repo as a contributor, such as how the build script works, best practices for PRs, and how the code is structured.
|
||||
|
||||
To get started, please take a look at our step-by-step [guide](./contributing/contributing.md) to get you started!
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
If you'd like to contribute to the Fluid Framework open source codebase, first of all, thank you! We'd love to see your ideas and appreciate your contributions, whether they be in the form of bug reports, idea suggestions, code submissions, or just trying out our platform.
|
||||
|
||||
To this end, we have tried to make it as easy as possible to set up your local clone of the Fluid Framework so that you can hit the ground running. Let's get started!
|
||||
We have tried to make it as easy as possible to set up your local clone of the Fluid Framework so that you can hit the ground running. Let's get started!
|
||||
|
||||
## Show me the Repo!
|
||||
## Where is the Repo?
|
||||
|
||||
The official Fluid Framework code repository resides on [GitHub](https://github.com/microsoft/fluidframework). In the next few steps, we will look at how to create our own fork of the official repository and set up a local git clone.
|
||||
|
||||
|
@ -37,7 +37,7 @@ The remote you fork from is most often referred to as `upstream`, and we will us
|
|||
```bash
|
||||
git clone https://github.com/{YOUR-USER-NAME}/FluidFramework.git
|
||||
```
|
||||
2. Now, we will add the upstream remote to the official version of the repo.
|
||||
2. Now, we will add the `upstream` remote to the official version of the repo.
|
||||
|
||||
```bash
|
||||
git remote add upstream https://github.com/microsoft/FluidFramework
|
||||
|
@ -48,7 +48,7 @@ git remote add upstream https://github.com/microsoft/FluidFramework
|
|||
git fetch upstream
|
||||
```
|
||||
|
||||
4. Now, we want our fork's `master` branch to track the official repo's `master` so that we always want to get the latest code.
|
||||
4. Now, we want our fork's `master` branch to track the official repo's `master` so that we always get the latest code there when we pull
|
||||
|
||||
```bash
|
||||
git branch master --set-upstream-to upstream/master
|
||||
|
@ -124,13 +124,17 @@ Here, you will need to click on "compare across forks" to start seeing the branc
|
|||
|
||||
5. Now you can simply click "Create Pull Request" to start the review process. Alternatively, you can also create a "Draft Pull Request" if the branch is still a work-in-progress.
|
||||
|
||||
### Legal
|
||||
|
||||
You will need to complete a [Contributor License Agreement (CLA)](../CLA.md) to submit changes. This agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. Upon submitting a pull request, you will automatically be given instructions on how to sign the CLA.
|
||||
|
||||
## Building and Running the Repo
|
||||
|
||||
The only pre-requisites for running the Fluid Framework code are:
|
||||
|
||||
* [Git LFS](https://git-lfs.github.com/) (included by default with most Git installations)
|
||||
* [Node v12.x](https://nodejs.org/en/download/)
|
||||
* [Docker](https://www.docker.com/get-started) (if you are running the `routerlicious` server docker image locally, not needing for just running client component packages)
|
||||
* [Docker](https://www.docker.com/get-started) (only required for running the `routerlicious` server docker image locally, not needed for just running client component packages)
|
||||
|
||||
With these dependencies installed, simply navigate to the FluidFramework directory and run the following two commands:
|
||||
```bash
|
||||
|
@ -144,7 +148,7 @@ When it has successfully finished, your output will look similar to this
|
|||
|
||||
The first time you run these commands, they will take some time as it is downloading all of the dependencies and setting up symlinks for the local packages to be able to use them. Any subsequent runs should be much faster.
|
||||
|
||||
`npm install` will only re-download packages that are not present locally or ones that were updated
|
||||
`npm install` will only re-download packages that were not present locally or ones that were updated
|
||||
|
||||
`npm run build:fast` will only re-compile code that has been edited, and any code that is dependent on the edited code. It will skip the tasks for any unedited code.
|
||||
|
||||
|
@ -157,7 +161,7 @@ The first time you run these commands, they will take some time as it is downloa
|
|||
cd ./components/examples/clicker
|
||||
```
|
||||
2. Start the component
|
||||
```
|
||||
```bash
|
||||
npm run start
|
||||
```
|
||||
3. Open you browser and navigate to the http://localhost:8080 to see two renders of `Clicker` side-by-side. The two represent two different clients rendering `Clicker` using a local in-memory server.
|
||||
|
@ -170,7 +174,7 @@ That's why, if you refresh the page using the same URL, you will see that the `C
|
|||
|
||||
To load a new session, simply change the string or remove it all together. You will see that on the new page, `Clicker` once again starts from 0.
|
||||
|
||||
4. To open another component simultaneously, just navigate to its directory in a separate terminal window and run `npm run start` again. It will now load the second component in "http://localhost:8081" since 8080 is already in use.
|
||||
4. To open another component simultaneously, just navigate to its directory in a separate terminal window and run `npm run start` again. It will now load the second component in http://localhost:8081 since 8080 is already in use.
|
||||
|
||||
### Editing Components
|
||||
|
||||
|
@ -180,13 +184,13 @@ You can dynamically edit components while they are running! Simply run the compo
|
|||
|
||||
As long as the changes are local to the component package itself, the script running the component will automatically recompile when you save your changes and refresh with your updates.
|
||||
|
||||
It's usually a good idea to update the string at the end of your "http://localhost:8080/" URL after this as the older session may be corrupted from your older code. Starting a new session by changing the string will give you a clean environment.
|
||||
It's usually a good idea to update the string at the end of your "http://localhost:8080/" URL after this as the older session storage may be corrupted from your older code. Starting a new session by changing the string will give you a clean environment.
|
||||
|
||||
#### Cross-Package Changes
|
||||
|
||||
If you are editing code across multiple packages, you will need to run `npm run build:fast` again to have your component pick these changes up.
|
||||
|
||||
`Clicker`, for example, has dependencies on the `@fluidframework/aqueduct` package. If we modified code in `aqueduct` and we needed clicker to pick these up, simply re-run `npm run build:fast` from the repo root.
|
||||
`Clicker`, for example, has dependencies on the `@fluidframework/aqueduct` package. If we modified code in `aqueduct` and we needed `Clicker` to pick these up, simply re-run `npm run build:fast` from the repo root.
|
||||
|
||||
If this is not the first build, it will only re-build `@fluidframework/aqueduct` and any packages that depend on it (including `Clicker`). All other packages will be ignored as there is no change there.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче