Skip to content

Commit

Permalink
Making "gulp docs" work (#11929)
Browse files Browse the repository at this point in the history
* update docs to use correct types

* fixing tsconfig path

* fixing relative imports of the react/package.json from docs

* apparently the eslintplugin is stuck on a specific version (taking on deprecated utils)

* gulp docs works!!
  • Loading branch information
kenotron authored Feb 12, 2020
1 parent d83580c commit 60ff30a
Show file tree
Hide file tree
Showing 28 changed files with 258 additions and 341 deletions.
7 changes: 2 additions & 5 deletions packages/fluentui/ability-attributes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts",
Expand All @@ -9,8 +9,5 @@
"noUnusedParameters": true,
"strictNullChecks": true
},
"include": [
"src",
"test"
]
"include": ["src", "test"]
}
7 changes: 2 additions & 5 deletions packages/fluentui/accessibility/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts"
},
"include": [
"src",
"test"
]
"include": ["src", "test"]
}
6 changes: 2 additions & 4 deletions packages/fluentui/code-sandbox/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts"
},
"include": [
"src"
],
"include": ["src"],
"references": [
{
"path": "../docs-components"
Expand Down
6 changes: 2 additions & 4 deletions packages/fluentui/docs-components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts"
},
"include": [
"src"
]
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/fluentui/docs/src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { NavLink, NavLinkProps, withRouter } from 'react-router-dom';

type ComponentMenuItem = { displayName: string; type: string };

const pkg = require('../../../../packages/react/package.json');
const pkg = require('@fluentui/react/package.json');
const componentMenu: ComponentMenuItem[] = require('../../componentMenu');
const behaviorMenu: ComponentMenuItem[] = require('../../behaviorMenu');

Expand Down
36 changes: 15 additions & 21 deletions packages/fluentui/docs/src/views/Introduction.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as _ from 'lodash'
import * as React from 'react'
import { NavLink } from 'react-router-dom'
import { Flex, Header } from '@fluentui/react'
import * as _ from 'lodash';
import * as React from 'react';
import { NavLink } from 'react-router-dom';
import { Flex, Header } from '@fluentui/react';

import pkg from '../../../packages/react/package.json'
import Logo from '../components/Logo/Logo'
import pkg from '@fluentui/react/package.json';
import Logo from '../components/Logo/Logo';

const Introduction = () => (
<div style={{ margin: '0 225px', fontSize: '1.125em', maxWidth: '100ch' }}>
Expand All @@ -16,42 +16,36 @@ const Introduction = () => (
marginTop: '24px',
marginBottom: '0px',
fontSize: '2rem',
textAlign: 'center',
textAlign: 'center'
}}
>
{_.capitalize(pkg.name)}
<Header.Description
styles={{
margin: 0,
fontSize: '1.14285714rem',
fontSize: '1.14285714rem'
}}
>
{pkg.description}
</Header.Description>
</Header>
</Flex>
<p>
Fluent UI provides extensible vanilla JavaScript solutions to component state, styling, and
accessibility. These powerful features are exposed behind simple APIs based on natural
language.
</p>
<p>
Fluent UI React is being built as an exemplar of the Fluent UI design language, component
specifications, and utilities.
Fluent UI provides extensible vanilla JavaScript solutions to component state, styling, and accessibility. These powerful features are
exposed behind simple APIs based on natural language.
</p>
<p>Fluent UI React is being built as an exemplar of the Fluent UI design language, component specifications, and utilities.</p>

<h3>Learn</h3>
<p>
The best place to start is with the <NavLink to="shorthand-props">Shorthand Props</NavLink>{' '}
concept.
The best place to start is with the <NavLink to="shorthand-props">Shorthand Props</NavLink> concept.
</p>

<h3>Start</h3>
<p>
If you want to get going right away, see the <NavLink to="quick-start">Quick Start</NavLink>{' '}
guide.
If you want to get going right away, see the <NavLink to="quick-start">Quick Start</NavLink> guide.
</p>
</div>
)
);

export default Introduction
export default Introduction;
33 changes: 8 additions & 25 deletions packages/fluentui/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
{
"extends": "@uifabric/build/typescript/tsconfig.common",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"module": "esnext",
"paths": {
"@fluentui/*": [
"packages/fluentui/*/src"
],
"docs/*": [
"packages/fluentui/docs/*"
],
"src/*": [
"packages/fluentui/react/src/*"
],
"test/*": [
"packages/fluentui/react/test/*"
]
"@fluentui/*": ["packages/fluentui/*/src/index"],
"docs/*": ["packages/fluentui/docs/*"],
"src/*": ["packages/fluentui/react/src/*"],
"test/*": ["packages/fluentui/react/test/*"]
},
"typeRoots": [
"../types",
"../node_modules/@types"
],
"types": [
"node",
"webpack-env",
"screener-runner"
]
"typeRoots": ["../../../typings", "../node_modules/@types"],
"types": ["node", "webpack-env", "screener-runner"]
},
"include": [
"./src"
]
"include": ["./src"]
}
12 changes: 3 additions & 9 deletions packages/fluentui/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"extends": "@uifabric/build/typescript/tsconfig.common",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"module": "esnext",
"allowSyntheticDefaultImports": true,
"types": [
"node",
"jest",
"webpack-env"
]
"types": ["node", "jest", "webpack-env"]
},
"include": [
"."
]
"include": ["."]
}
4 changes: 2 additions & 2 deletions packages/fluentui/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@fluentui/eslint-plugin",
"version": "0.44.0",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^2.5.0",
"@typescript-eslint/experimental-utils": "^2.5.0"
"@typescript-eslint/eslint-plugin": "2.8.0",
"@typescript-eslint/experimental-utils": "2.8.0"
},
"files": [
"rules"
Expand Down
11 changes: 3 additions & 8 deletions packages/fluentui/perf/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"extends": "@uifabric/build/typescript/tsconfig.common",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"module": "esnext",
"types": [
"node",
"webpack-env"
]
"types": ["node", "webpack-env"]
},
"include": [
"./src"
]
"include": ["./src"]
}
7 changes: 2 additions & 5 deletions packages/fluentui/react-bindings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts",
Expand All @@ -9,10 +9,7 @@
"noUnusedParameters": true,
"strictNullChecks": true
},
"include": [
"src",
"test"
],
"include": ["src", "test"],
"references": [
{
"path": "../accessibility"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts",
Expand All @@ -9,9 +9,6 @@
"noUnusedParameters": true,
"strictNullChecks": true
},
"include": [
"src",
"test"
],
"include": ["src", "test"],
"references": []
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts",
Expand All @@ -9,9 +9,6 @@
"noUnusedParameters": true,
"strictNullChecks": true
},
"include": [
"src",
"test"
],
"include": ["src", "test"],
"references": []
}
7 changes: 2 additions & 5 deletions packages/fluentui/react-component-ref/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts",
Expand All @@ -9,9 +9,6 @@
"noUnusedParameters": true,
"strictNullChecks": true
},
"include": [
"src",
"test"
],
"include": ["src", "test"],
"references": []
}
7 changes: 2 additions & 5 deletions packages/fluentui/react-proptypes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"extends": "@uifabric/build/typescript/tsconfig.fluentui",
"extends": "../../../scripts/typescript/tsconfig.fluentui",
"compilerOptions": {
"composite": true,
"outDir": "dist/dts"
},
"include": [
"src",
"test"
],
"include": ["src", "test"],
"references": []
}
Loading

0 comments on commit 60ff30a

Please sign in to comment.