Skip to content

Commit

Permalink
chore: testing run with node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
timeowilliams committed Sep 14, 2024
1 parent f4d5f04 commit f20387c
Show file tree
Hide file tree
Showing 6,541 changed files with 1,092,590 additions and 225 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
node_modules
28 changes: 11 additions & 17 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29111,26 +29111,20 @@ var __webpack_exports__ = {};
(async function run() {
try {
// Step 1: Get the path and limit inputs from the user
const path = core.getInput("path") || "build/static/js/*.js"; // Default path to JS files
const limit = core.getInput("limit") || "500 KB"; // Default size limit
const label = core.getInput("label") || "Bundle Size"; // Badge label
const color = core.getInput("color") || "blue"; // Badge color

// Step 2: Install necessary dependencies
// console.log("Installing size-limit dependencies...");
// execSync("npm install size-limit @size-limit/preset-app", {
// stdio: "inherit",
// });

// Step 3: Run size-limit to generate the report
const path = core.getInput("path") || "build/static/js/*.js";
const limit = core.getInput("limit") || "500 KB";
const label = core.getInput("label") || "Bundle Size";
const color = core.getInput("color") || "blue";

// Step 2: Ensure size-limit is available (if running via npx fails)
console.log("Running size-limit...");
(0, external_child_process_namespaceObject.execSync)(
"npx size-limit --json > size-report.json",
"./node_modules/.bin/size-limit --json > size-report.json",
{ stdio: "inherit" },
);
console.log("Size limit executed successfully");

// Step 4: Parse the size-limit output
// Step 3: Parse the size-limit output
let report;
try {
report = JSON.parse(
Expand All @@ -29141,12 +29135,12 @@ var __webpack_exports__ = {};
return;
}

// Step 5: Extract the bundle size in KB
const size = Math.round(report[0].size / 1024); // Convert bytes to KB
// Step 4: Extract the bundle size in KB
const size = Math.round(report[0].size / 1024);
core.setOutput("size", size);
console.log(`Bundle size: ${size} KB`);

// Step 6: Create badge URL using shields.io
// Step 5: Create badge URL using shields.io
const badgeUrl = `https://img.shields.io/badge/${encodeURIComponent(label)}-${size}KB-${color}`;
console.log(`Badge URL: ${badgeUrl}`);
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/browsers

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esbuild

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/escodegen

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esgenerate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esparse

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/estimo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esvalidate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/extract-zip

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jiti

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nanoid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/ncc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/prettier

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/size-limit

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/terser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/update-browserslist-db

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/webpack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f20387c

Please sign in to comment.