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

fix(web-components): dont ship non production assets to npm registry #26854

Merged
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
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix(web-components): dont ship non production assets to npm registry",
"packageName": "@fluentui/web-components",
"email": "martinhochel@microsoft.com",
"dependentChangeType": "patch"
}
23 changes: 15 additions & 8 deletions packages/web-components/.npmignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
.vscode/

# Tests
*.spec.*
*.test.*
coverage/
__fixtures__
__mocks__
__tests__

# images
images/

# Source files
src/

scripts/

# config files
.eslintignore
.eslintrc.js
.eslintrc.json
.prettierignore
.storybook
tsconfig.json
tsconfig.lib.json
tsconfig.spec.json
tsconfig.build.json
tsconfig.*.json
rollup.config.json
rollup.config.js
karma.conf.cjs
api-extractor.json
.mocharc.json

# Storybook static site
dist/storybook-static/
# Storybook
.storybook
*.stories.*
public/
dist/storybook-static/

# cache
.rollupcache
temp
temp/
etc/
CHANGELOG.json
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this one.

Copy link
Member

Choose a reason for hiding this comment

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

I mean CHANGELOG.json

Copy link
Contributor Author

@Hotell Hotell Feb 15, 2023

Choose a reason for hiding this comment

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

there is no purpose to ship metadata json to registry, but it turns out that even ignore wont work on this one. Im aware that you cannot ignore Readme.md and Changelog.md but this is a bit mystery to me heh

10 changes: 3 additions & 7 deletions packages/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,8 @@
"api-extractor": "api-extractor",
"compile": "node ./scripts/compile",
"clean": "node ./scripts/clean dist",
"doc": "api-extractor run --local",
"doc:ci": "yarn doc",
"build": "yarn compile && rollup -c && yarn doc",
"dev": "tsc -p ./tsconfig.json -w",
"tdd": "yarn dev & yarn test-chrome:watch",
"prepare": "yarn clean && yarn build",
"generate-api": "api-extractor run --local",
"build": "yarn compile && rollup -c && yarn generate-api",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"format": "prettier -w 'src/**/(*.ts|*.html)' --ignore-path ../../.prettierignore",
Expand All @@ -64,7 +60,7 @@
"start": "yarn start-storybook -p 6006 --docs --no-manager-cache",
"start-storybook": "node node_modules/@storybook/html/bin/index",
"build-storybook": "node node_modules/@storybook/html/bin/build -o ./dist/storybook --docs",
"test": "yarn doc:ci && yarn test-chrome:verbose",
"test": "yarn test-chrome:verbose",
"test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
"test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
"test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage",
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/badge/badge.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html, when } from '@microsoft/fast-element';
import type { Args, Meta } from '@storybook/html';
import { renderComponent } from '../helpers.js';
import { renderComponent } from '../helpers.stories.js';
import type { Badge as FluentBadge } from './badge.js';
import { BadgeAppearance, BadgeColor, BadgeShape, BadgeSize } from './badge.options.js';
import './define.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html } from '@microsoft/fast-element';
import type { Args, Meta } from '@storybook/html';
import { renderComponent } from '../helpers.js';
import { renderComponent } from '../helpers.stories.js';
import type { CounterBadge as FluentCounterBadge } from './counter-badge.js';
import {
CounterBadgeAppearance,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html } from '@microsoft/fast-element';
import type { Args, Meta } from '@storybook/html';
import { renderComponent } from '../helpers.js';
import { renderComponent } from '../helpers.stories.js';
import type { ProgressBar as FluentProgressBar } from './progress-bar.js';
import { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
import './define.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/spinner/spinner.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html } from '@microsoft/fast-element';
import type { Args, Meta } from '@storybook/html';
import { renderComponent } from '../helpers.js';
import { renderComponent } from '../helpers.stories.js';
import { SpinnerAppearance, SpinnerSize } from './spinner.options.js';
import './define.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/text/text.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { html } from '@microsoft/fast-element';
import type { Args, Meta } from '@storybook/html';
import { renderComponent } from '../helpers.js';
import { renderComponent } from '../helpers.stories.js';
import type { Text as FluentText } from './text.js';
import './define.js';
import { TextAlign, TextFont, TextSize, TextWeight } from './text.options.js';
Expand Down