Skip to content

Commit

Permalink
chore(install): slighly reduce install size by excluding tests in pub…
Browse files Browse the repository at this point in the history
…lish
  • Loading branch information
mlaursen committed Jul 18, 2021
1 parent 4d2ab41 commit 9d01a44
Show file tree
Hide file tree
Showing 68 changed files with 204 additions and 235 deletions.
6 changes: 6 additions & 0 deletions packages/alert/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/app-bar/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/app-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/autocomplete/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/avatar/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/badge/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/badge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/button/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/card/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/chip/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-utils/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ createCommand("variables")

createCommand("configs")
.description(
"Re-generates all the `tsconfig.*` files for the Typescript project references."
"Re-generates all the `tsconfig.*` files for the Typescript project references and any publishing shared data"
)
.action(() => configs());

Expand Down
13 changes: 11 additions & 2 deletions packages/dev-utils/src/configs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { writeJson as fsWriteJson } from "fs-extra";
import { writeFile, writeJson as fsWriteJson } from "fs-extra";
import { flatMap, merge } from "lodash";
import { join } from "path";

Expand All @@ -11,6 +11,14 @@ import {
} from "./constants";
import { clean, getDependencies, getPackages, glob } from "./utils";

const NPM_IGNORE_CONTENTS = `src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
`;

const TSCONFIG = {
extends: "../../tsconfig.base.json",
compilerOptions: {
Expand Down Expand Up @@ -124,7 +132,8 @@ export async function configs(): Promise<void> {
promises.push(
writeJson(join(path, "tsconfig.json"), TSCONFIG),
writeJson(join(path, "tsconfig.ejs.json"), ejsConfig),
writeJson(join(path, "tsconfig.cjs.json"), cjsConfig)
writeJson(join(path, "tsconfig.cjs.json"), cjsConfig),
writeFile(join(path, ".npmignore"), NPM_IGNORE_CONTENTS)
);
}

Expand Down
6 changes: 6 additions & 0 deletions packages/dialog/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/divider/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/divider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
4 changes: 0 additions & 4 deletions packages/elevation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/expansion-panel/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/expansion-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/form/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/icon/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/layout/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/link/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/list/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
7 changes: 0 additions & 7 deletions packages/list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
"sideEffects": [
"dist/**/*"
],
"files": [
"es/*",
"lib/*",
"types/*",
"src/*",
"dist/*"
],
"author": "Mikkel Laursen <mlaursen03@gmail.com>",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/material-icons/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/**/__tests__
src/**/*.scss
tsconfig.json
tsconfig.*.json
*tsbuildinfo
CHANGELOG.md
Loading

1 comment on commit 9d01a44

@vercel
Copy link

@vercel vercel bot commented on 9d01a44 Jul 18, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.