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

Publish: Don't distribute src files or unnecessary template files #23853

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 2 additions & 1 deletion code/addons/a11y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
Copy link
Member

@IanVS IanVS Aug 16, 2023

Choose a reason for hiding this comment

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

Just curious, how was src being included in the first place? Was it the "*.js"? Most of our src files are typescript, so I'm wondering how you're saving so many MB.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the *.js match would include things in src such as src/__mockdata__/someStory.js and things like that.
The biggest chunk that got shaved off doesn't come from that, it comes from changes like this:

-    "template/**/*",
+    "template/cli/**/*",

because we were introducing a lot of example stories that only matter for our sandboxes (a little over 800kb)

],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/backgrounds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@
"lit/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/gfm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/highlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/measure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/outline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/storyshots-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"README.md",
"*.js",
"*.mjs",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/storyshots-puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"README.md",
"*.js",
"*.mjs",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/storysource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/toolbars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/addons/viewport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/builders/builder-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"templates/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/builders/builder-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"input/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"templates/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
4 changes: 2 additions & 2 deletions code/deprecated/addons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"types": "./dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/deprecated/channel-postmessage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/deprecated/channel-websocket/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/deprecated/client-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/deprecated/manager-api-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/deprecated/preview-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/deprecated/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
5 changes: 3 additions & 2 deletions code/frameworks/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"template/cli/**/*",
"README.md",
"*.js",
"*.mjs",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/node_modules/.bin/tsc",
Expand Down
5 changes: 3 additions & 2 deletions code/frameworks/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"template/cli/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/html-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/html-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
5 changes: 3 additions & 2 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"template/cli/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
3 changes: 2 additions & 1 deletion code/frameworks/preact-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"types/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/preact-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*",
"template/**/*",
"README.md",
"*.js",
"*.d.ts"
"*.d.ts",
"!src/**/*"
],
"scripts": {
"check": "../../../scripts/prepare/check.ts",
Expand Down
Loading
Loading