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

Improve HttpRequests #1741

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"test": "vitest run --coverage",
"types:watch": "nodemon --config nodemon.json",
"types": "yarn tsc",
"test:env:browser": "yarn build && yarn --cwd tests/env/express && yarn --cwd tests/env/express test",
"test:env:browser": "yarn build && node scripts/copy-umd-file.js --to ./tests/env/express/public && yarn --cwd tests/env/express && yarn --cwd tests/env/express test",
"test:watch": "vitest watch",
"test:coverage": "yarn test",
"test:ci": "yarn test",
Expand Down
16 changes: 16 additions & 0 deletions scripts/copy-umd-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { parseArgs } = require("node:util");
const { resolve, join, basename } = require("node:path");
const { copyFileSync } = require("node:fs");
const pkg = require("../package.json");

const {
values: { to },
} = parseArgs({ options: { to: { type: "string" } } });

if (to === undefined) {
throw new Error("required argument `to` missing");
}

const umdAbsolutePath = resolve(__dirname, join("..", pkg.jsdelivr));

copyFileSync(umdAbsolutePath, join(to, basename(pkg.jsdelivr)));
Loading