Point people to readme instead of having this wiki page duplicate the readme
Родитель
34bdf880df
Коммит
2e7b94e47d
101
Home.md
101
Home.md
|
@ -1,105 +1,12 @@
|
|||
## [Office UI Fabric React](http://dev.office.com/fabric)
|
||||
|
||||
##### The React-based front-end framework for building experiences for Office and Office 365.
|
||||
**The React-based front-end framework for building experiences for Office and Office 365.**
|
||||
|
||||
[![npm version](https://badge.fury.io/js/office-ui-fabric-react.svg)](https://badge.fury.io/js/office-ui-fabric-react)
|
||||
[![Build Status](https://travis-ci.org/OfficeDev/office-ui-fabric-react.svg?branch=master)](https://travis-ci.org/OfficeDev/office-ui-fabric-react)
|
||||
|
||||
Fabric React is a responsive, mobile-first collection of robust components designed to make it quick and simple for you to create web experiences using the Microsoft Design Language.
|
||||
Fabric React is a collection of robust React-based components designed to make it simple for you to create consistent web experiences using the Office Design Language.
|
||||
|
||||
### Using Fabric React
|
||||
|
||||
[Here is a step by step tutorial](Sample-App) on how to build a simple React app with office-ui-fabric-react components.
|
||||
|
||||
The best way to integrate components into your project depends heavily on your setup. The recommended setup is to use a bundler such as [Webpack](https://webpack.js.org/) which can resolve NPM package imports in your code and bundle only the specific things you import.
|
||||
|
||||
Within an npm project, you should install the package and save it as a dependency:
|
||||
|
||||
```
|
||||
npm install --save office-ui-fabric-react
|
||||
```
|
||||
|
||||
This will add the project as a dependency in your `package.json` file and download the project under `node_modules/office-ui-fabric-react`.
|
||||
|
||||
The library includes ES2015 module entry points under the `lib` folder (use `lib-amd` if you need AMD modules, or `lib-commonjs` if you need commonjs). To use a control, you should be able to import it and use it in your render method:
|
||||
|
||||
```js
|
||||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import { PrimaryButton } from 'office-ui-fabric-react/lib/Button';
|
||||
|
||||
ReactDOM.render(
|
||||
<PrimaryButton>
|
||||
I am a button.
|
||||
</PrimaryButton>,
|
||||
document.body.firstChild
|
||||
);
|
||||
```
|
||||
|
||||
### Browser support
|
||||
|
||||
Fabric React supports many commonly used browsers. See the [browser support doc](Browser-Support) for more information.
|
||||
|
||||
## Contribute to Fabric React
|
||||
|
||||
Please take a look at our [contribution guidelines](Contributing) for more info. Also read [Contribute bug fixes](Bug-Fixes) and [Contribute new component](New-Components).
|
||||
|
||||
## Building the repo
|
||||
|
||||
Before you get started, **make sure you have read the [Git branch setup instrucions](Setup)**
|
||||
|
||||
To view the documentation including examples, contracts, component status, and to add functionality or fix issues locally, you can:
|
||||
|
||||
1. `git clone https://github.com/OfficeDev/office-ui-fabric-react.git`
|
||||
2. `cd office-ui-fabric-react`
|
||||
3. `npm install`
|
||||
4. `npm start`
|
||||
|
||||
This will start a demo page from the office-ui-fabric-react package folder, which will open a web browser with the example page. You can make changes to the code which will automatically build and refresh the page using live-reload.
|
||||
|
||||
To build and run tests for all packages in the repo, run `npm run build` from the root.
|
||||
|
||||
To build individual packages within the `packages/*/` folders, you can use `npm run build` in each package folder individually. Note that because the packages are symlinked together, you must manage building dependencies in the right order, or use the `rush` tool to build to the specific package you want. (See advanced tips below.)
|
||||
|
||||
## Testing
|
||||
|
||||
For testing see our [testing documentation](Testing).
|
||||
|
||||
## Advanced usage
|
||||
|
||||
For advanced usage including info about module vs. path-based imports, using an AMD bundler like require.js, and deployment features, see our [advanced documentation](Advanced-Usage).
|
||||
|
||||
## Advanced building tips
|
||||
|
||||
The repo contains many packages, each which may have dependencies on each other. You can use Rush to build projects in the correct order, if you have it globally installed.
|
||||
|
||||
```bash
|
||||
npm install -g @microsoft/rush
|
||||
```
|
||||
|
||||
To use Rush to build, you can run `rush build`, which will incrementally build the entire repo (only build what has changed since the last build.)
|
||||
|
||||
To build up to a specific project, use the `--to <package>` argument. For example, to build up to `office-ui-fabric-react`, you can run:
|
||||
|
||||
```bash
|
||||
rush build --to office-ui-fabric-react
|
||||
```
|
||||
|
||||
## Licenses
|
||||
|
||||
All files on the Office UI Fabric React GitHub repository are subject to the MIT license. Please read the License file at the root of the project.
|
||||
|
||||
Usage of the fonts and icons referenced in Office UI Fabric is subject to the terms of the [assets license agreement](http://aka.ms/fabric-assets-license).
|
||||
|
||||
## Changelog
|
||||
|
||||
We use [GitHub Releases](https://github.com/blog/1547-release-your-software) to manage our releases, including the changelog between every release. View a complete list of additions, fixes, and changes on the [releases](https://github.com/OfficeDev/office-ui-fabric-react/releases) page.
|
||||
|
||||
- - -
|
||||
|
||||
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.
|
||||
|
||||
## Issue management and `Stale-bot`
|
||||
|
||||
If you are getting `stale[bot]` messages and/or want to understand how we manage issues, please search for 'issue triage' and/or 'stale[bot]' in the [FAQ](FAQ).
|
||||
## Using Fabric React
|
||||
|
||||
For information about using, building, and contributing to Fabric React, see the [README](https://github.com/OfficeDev/office-ui-fabric-react/blob/master/README.md#using-fabric-react).
|
||||
|
|
Загрузка…
Ссылка в новой задаче