Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions apps/fabric-website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,26 @@ Office UI Fabric is a collection of projects that represent the Office and Offic

Before you get started, make sure you have [node.js](https://nodejs.org/), [gulp](http://gulpjs.com/), and [git](https://git-scm.com/) installed. To view the documentation including examples, contracts, current statuses, and to add functionality or fix issues locally, you can:

1. `git clone https://github.com/OfficeDev/office-ui-fabric-react.git` - this is the [Office UI Fabric React project](https://github.com/OfficeDev/office-ui-fabric-react) which you will want to name *office-ui-fabric-react*
2. `npm install` the Fabric React project you just cloned in the previous step.
3. In the command prompt change directories to the fabric-website director in apps `cd apps/fabric-website/`.
4. Then to start the website run `npm start`. This will open your operating system's default web browser with the website. You can make changes to the code which will automatically build and refresh the page using live-reload.
1. `git clone https://github.com/OfficeDev/office-ui-fabric-react.git` - this is the [Office UI Fabric React project](https://github.com/OfficeDev/office-ui-fabric-react) which you will want to name _office-ui-fabric-react_
2. `npm install` the Fabric React project you just cloned in the previous step.
3. In the command prompt change directories to the fabric-website director in apps `cd apps/fabric-website/`.
4. Then to start the website run `npm start`. This will open your operating system's default web browser with the website. You can make changes to the code which will automatically build and refresh the page using live-reload.

**Note**: Were any steps missing? Could the instructions be made clearer for the next person? Update the instructions above and submit a pull request!

## Test serving minified files locally

1. `npm install -g http-server`
2. In the fabric-website directory, run `npm run production` to build your minified files. They should be in the dist folder.
3. `index.html` has logic to check if the app is running locally to serve the proper files.
4. In the same directory, run `http-server`. This should serve the website for you to test as it runs on your new minified files.

## 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 referenced in Office UI Fabric files is subject to the [license](https://spoprod-a.akamaihd.net/files/fabric/assets/microsoft_fabric_assets_license_agreement_10262017.pdf).

- - -
---

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.
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.
6 changes: 5 additions & 1 deletion apps/fabric-website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@
}
}

var isLocal = window.location.hostname === 'localhost';
// This path allows minified files to be served locally for testing purposes.
var appPath = isLocal ? './dist/' : '';

var scripts = [
'//cdnjs.cloudflare.com/ajax/libs/react/16.3.1/umd/react.production.min.js',
'//cdnjs.cloudflare.com/ajax/libs/react-dom/16.3.1/umd/react-dom.production.min.js',
'/fabric-sitev5.js'
appPath + '/fabric-sitev5.js'
];

loadScript(scripts);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@uifabric/fabric-website",
"comment": "Add documentation for testing minified files locally.",
"type": "patch"
}
],
"packageName": "@uifabric/fabric-website",
"email": "lynam.emily@gmail.com"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Package: Fix sideEffects array to target scss files using global.",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "lynam.emily@gmail.com"
}
6 changes: 3 additions & 3 deletions packages/office-ui-fabric-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"sideEffects": [
"*.global.js",
"*Examples.js",
"*Example.js"
"*.global.*",
"*Examples.*",
"*Example.*"
],
"typings": "lib/index.d.ts",
"repository": {
Expand Down