Skip to content

Commit

Permalink
feat(web-components): new build/test/docs setup (#3156)
Browse files Browse the repository at this point in the history
* chore(fast-components): new build/test/docs setup

* chore(fast-components): add missing test files

* fix(fast-components): use esm for node build and remove module pack type

* fix(fast-components): remove unneeded files and fix import syntax

* fix(fast-components): full rollup build of components

* feat(fast-components): get all builds working

* fix(fast-element): convert to using esm node plugin

* fix(fast-foundation): switch to using esm node plugin and add script out

* fix(fast-components-msft): build setup consistent with other wc packs

* chore(fast-components): fix prettier issues

* fix(web-components): story book config cleanup

* fix(fast-element): once again correct some formatter's bad formatting

Co-authored-by: EisenbergEffect <[email protected]>
  • Loading branch information
2 people authored and chrisdholt committed May 18, 2020
1 parent bdfffae commit 51d909a
Show file tree
Hide file tree
Showing 187 changed files with 3,766 additions and 1,317 deletions.
4 changes: 3 additions & 1 deletion packages/web-components/fast-components-msft/.eslintignore
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
3 changes: 2 additions & 1 deletion packages/web-components/fast-components-msft/.prettierignore
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;
// (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

0 comments on commit 51d909a

Please sign in to comment.