Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-components): new build/test/docs setup #3156

Merged
merged 13 commits into from
May 17, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ dist
# don't lint coverage output
coverage
# don't lint storybook
.storybook
.storybook
# don't lint tests
*.spec.*
9 changes: 9 additions & 0 deletions packages/web-components/fast-components-msft/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"colors": true,
"recursive": true,
"timeout": 5000,
"require": [
"esm",
"jsdom-global/register"
]
}
17 changes: 12 additions & 5 deletions packages/web-components/fast-components-msft/.npmignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Tests
__test__/
*.test.*

# specifications
dist/dts/__test__/
dist/esm/__test__/
*.spec.*
coverage/

# images
images/
Expand All @@ -17,4 +16,12 @@ src/
.prettierignore
.storybook
tsconfig.json
tsconfig.build.json
tsconfig.build.json
rollup.config.json
karma.conf.cjs
api-extractor.json
.mocharc.json

# cache
.rollupcache
temp
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage/*
dist/*
dist/*
*.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ module.exports = {
stories: ["../src/**/*.stories.ts"],
webpackFinal: async config => {
config.module.rules.push({
test: /\.(ts)$/,
test: /\.ts$/,
use: [
{
loader: require.resolve("ts-loader"),
},
],
});
config.resolve.extensions.push(".ts");
config.resolve.extensions.push(".js");
config.plugins.push(
new CircularDependencyPlugin({
exclude: /node_modules/,
Expand Down
20 changes: 20 additions & 0 deletions packages/web-components/fast-components-msft/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",

"mainEntryPointFilePath": "dist/dts/index.d.ts",

"apiReport": {
"enabled": true,
"reportFolder": "docs",
"reportFileName": "api-report.md"
},

"docModel": {
"enabled": true,
"apiJsonFilePath": "dist/fast-components-msft.api.json"
},

"dtsRollup": {
"enabled": true
}
}
257 changes: 257 additions & 0 deletions packages/web-components/fast-components-msft/docs/api-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
## API Report File for "@microsoft/fast-components-msft"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import { Anchor } from '@microsoft/fast-foundation';
import { Badge } from '@microsoft/fast-foundation';
import { BaseProgress } from '@microsoft/fast-foundation';
import { Button } from '@microsoft/fast-foundation';
import { Card } from '@microsoft/fast-foundation';
import { Checkbox } from '@microsoft/fast-foundation';
import { DensityOffset } from '@microsoft/fast-components-styles-msft';
import { DesignSystem } from '@microsoft/fast-components-styles-msft';
import { DesignSystemProvider } from '@microsoft/fast-foundation';
import { Dialog } from '@microsoft/fast-foundation';
import { Divider } from '@microsoft/fast-foundation';
import { Flipper } from '@microsoft/fast-foundation';
import { Radio } from '@microsoft/fast-foundation';
import { RadioGroup } from '@microsoft/fast-foundation';
import { Slider } from '@microsoft/fast-foundation';
import { SliderLabel } from '@microsoft/fast-foundation';
import { Switch } from '@microsoft/fast-foundation';
import { Tab } from '@microsoft/fast-foundation';
import { TabPanel } from '@microsoft/fast-foundation';
import { Tabs } from '@microsoft/fast-foundation';
import { TextArea } from '@microsoft/fast-foundation';
import { TextField } from '@microsoft/fast-foundation';

// @public (undocumented)
export type BadgeAppearance = "accent" | "lightweight" | "neutral" | string;

// @public (undocumented)
export class FASTAnchor extends Anchor {
}

// @public (undocumented)
export class FASTBadge extends Badge {
// (undocumented)
appearance: BadgeAppearance;
}

// @public (undocumented)
export class FASTButton extends Button {
}

// @public (undocumented)
export class FASTCard extends Card {
}

// @public (undocumented)
export class FASTCheckbox extends Checkbox {
}

// @public (undocumented)
export class FASTDesignSystemProvider extends DesignSystemProvider implements Omit<DesignSystem, "contrast" | "direction" | "fontWeight" | "neutralForegroundDarkIndex" | "neutralForegroundLightIndex"> {
// (undocumented)
accentBaseColor: string;
Comment on lines +57 to +58
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicholasrice @EisenbergeEffect should we take a task to add typedoc comments to some of these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. I plan to add a bunch to fast-element while I'm traveling on Tuesday. One of the benefits of the api report is that it will show us where we're missing docs. It also helps us to see when we make breaking changes to APIs. One thing the api-extractor team recommends is to actually use code-owners on the api-report file so that you can ensure that specific people review PRs that affect that file, since it represents changes to docs or public APIs. Seems like an interesting idea.

// (undocumented)
accentFillActiveDelta: number;
// (undocumented)
accentFillFocusDelta: number;
// (undocumented)
accentFillHoverDelta: number;
// (undocumented)
accentFillRestDelta: number;
// (undocumented)
accentFillSelectedDelta: number;
// (undocumented)
accentForegroundActiveDelta: number;
// (undocumented)
accentForegroundFocusDelta: number;
// (undocumented)
accentForegroundHoverDelta: number;
// (undocumented)
accentForegroundRestDelta: number;
// (undocumented)
accentPalette: string[];
backgroundColor: string;
// (undocumented)
baseHeightMultiplier: number;
// (undocumented)
baseHorizontalSpacingMultiplier: number;
// (undocumented)
baseLayerLuminance: number;
// (undocumented)
cornerRadius: number;
// (undocumented)
density: DensityOffset;
// (undocumented)
designUnit: number;
// (undocumented)
disabledOpacity: number;
// (undocumented)
elevatedCornerRadius: number;
// (undocumented)
focusOutlineWidth: number;
// (undocumented)
neutralDividerRestDelta: number;
// (undocumented)
neutralFillActiveDelta: number;
// (undocumented)
neutralFillCardDelta: number;
// (undocumented)
neutralFillFocusDelta: number;
// (undocumented)
neutralFillHoverDelta: number;
// (undocumented)
neutralFillInputActiveDelta: number;
// (undocumented)
neutralFillInputFocusDelta: number;
// (undocumented)
neutralFillInputHoverDelta: number;
// (undocumented)
neutralFillInputRestDelta: number;
// (undocumented)
neutralFillInputSelectedDelta: number;
// (undocumented)
neutralFillRestDelta: number;
// (undocumented)
neutralFillSelectedDelta: number;
// (undocumented)
neutralFillStealthActiveDelta: number;
// (undocumented)
neutralFillStealthFocusDelta: number;
// (undocumented)
neutralFillStealthHoverDelta: number;
// (undocumented)
neutralFillStealthRestDelta: number;
// (undocumented)
neutralFillStealthSelectedDelta: number;
// (undocumented)
neutralFillToggleActiveDelta: number;
// (undocumented)
neutralFillToggleFocusDelta: number;
// (undocumented)
neutralFillToggleHoverDelta: number;
// (undocumented)
neutralForegroundActiveDelta: number;
// (undocumented)
neutralForegroundFocusDelta: number;
// (undocumented)
neutralForegroundHoverDelta: number;
// (undocumented)
neutralOutlineActiveDelta: number;
// (undocumented)
neutralOutlineFocusDelta: number;
// (undocumented)
neutralOutlineHoverDelta: number;
// (undocumented)
neutralOutlineRestDelta: number;
// (undocumented)
neutralPalette: string[];
// (undocumented)
outlineWidth: number;
// (undocumented)
typeRampBaseFontSize: string;
// (undocumented)
typeRampBaseLineHeight: string;
// (undocumented)
typeRampMinus1FontSize: string;
// (undocumented)
typeRampMinus1LineHeight: string;
// (undocumented)
typeRampMinus2FontSize: string;
// (undocumented)
typeRampMinus2LineHeight: string;
// (undocumented)
typeRampPlus1FontSize: string;
// (undocumented)
typeRampPlus1LineHeight: string;
// (undocumented)
typeRampPlus2FontSize: string;
// (undocumented)
typeRampPlus2LineHeight: string;
// (undocumented)
typeRampPlus3FontSize: string;
// (undocumented)
typeRampPlus3LineHeight: string;
// (undocumented)
typeRampPlus4FontSize: string;
// (undocumented)
typeRampPlus4LineHeight: string;
// (undocumented)
typeRampPlus5FontSize: string;
// (undocumented)
typeRampPlus5LineHeight: string;
// (undocumented)
typeRampPlus6FontSize: string;
// (undocumented)
typeRampPlus6LineHeight: string;
}

// @public (undocumented)
export class FASTDialog extends Dialog {
}

// @public (undocumented)
export class FASTDivider extends Divider {
}

// @public (undocumented)
export class FASTFlipper extends Flipper {
}

// @public (undocumented)
export class FASTProgress extends BaseProgress {
}

// @public (undocumented)
export class FASTProgressRing extends BaseProgress {
}

// @public (undocumented)
export class FASTRadio extends Radio {
}

// @public (undocumented)
export class FASTRadioGroup extends RadioGroup {
}

// @public (undocumented)
export class FASTSlider extends Slider {
}

// @public (undocumented)
export class FASTSliderLabel extends SliderLabel {
}

// @public (undocumented)
export class FASTSwitch extends Switch {
}

// @public (undocumented)
export class FASTTab extends Tab {
}

// @public (undocumented)
export class FASTTabPanel extends TabPanel {
}

// @public (undocumented)
export class FASTTabs extends Tabs {
}

// @public (undocumented)
export class FASTTextArea extends TextArea {
}

// @public (undocumented)
export class FASTTextField extends TextField {
}


// (No @packageDocumentation comment for this package)

```
Loading