Skip to content

Commit

Permalink
perf: bruk tiny-glob for globbing av filer under bygg
Browse files Browse the repository at this point in the history
  • Loading branch information
piofinn authored and wkillerud committed Jun 9, 2022
1 parent 053cb10 commit 246952a
Show file tree
Hide file tree
Showing 38 changed files with 92 additions and 82 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"express": "^4.16.3",
"get-port": "^6.1.2",
"gh-pages": "4.0.0",
"glob": "^8.0.1",
"gulp": "^4.0.2",
"gulp-postcss": "^9.0.0",
"gulp-rename": "^2.0.0",
Expand All @@ -117,6 +116,7 @@
"sass-embedded": "^1.52.2",
"stylelint": "^14.8.5",
"turbo": "^1.2.16",
"tiny-glob": "^0.2.9",
"typescript": "^4.7.3"
},
"browserslist": [
Expand Down
4 changes: 2 additions & 2 deletions packages/accordion-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/alert-message-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/breadcrumb-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/button-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/card-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/checkbox-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/constants-util/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/content-toggle-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/cookie-consent-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/core/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/datepicker-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/description-list-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/expand-button-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/feedback-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/field-group-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/footer-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/formatters-util/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/hamburger-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/icon-button-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/icons-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/image-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/list-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/loader-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/logo-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/message-box-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/radio-button-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/react-hooks/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/select-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/summary-table-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/table-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/tabs-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/tag-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/text-input-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/toggle-switch-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions packages/validators-util/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
4 changes: 2 additions & 2 deletions scripts/scaffold/templates/component-react/esbuild.prod.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import glob from "glob";
import glob from "tiny-glob";
import { build } from "../../esbuild.prod.mjs";

await build({
entryPoints: glob.sync("src/**/*.@(ts|tsx)", { ignore: "src/**/*.test.@(ts|tsx)" }),
entryPoints: await glob("src/**/!(*.test).@(ts|tsx)"),
outdir: "build",
});
Loading

0 comments on commit 246952a

Please sign in to comment.