Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrious committed May 30, 2023
1 parent 4dc3c16 commit b77cf89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
8 changes: 1 addition & 7 deletions .vscode/settings.json
@@ -1,12 +1,6 @@
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.enable": true,
"cSpell.words": [
"esbuild",
"outfile",
"Parens",
"vitepress"
]
"cSpell.words": ["esbuild", "outfile", "Parens", "vitepress"]
}
16 changes: 2 additions & 14 deletions scripts/flags.ts
@@ -1,20 +1,8 @@
import { get } from "https";

function fetch(url: string) {
return new Promise<string>((resolve, reject) => {
get(url, res => {
const chunks: Buffer[] = [];
res.on("data", chunk => chunks.push(chunk));
res.on("end", () => resolve(Buffer.concat(chunks).toString("utf8")));
}).on("error", reject);
});
}

async function main() {
let text = await fetch(
// "https://cdn.jsdelivr.net/gh/evanw/esbuild/pkg/cli/cli_impl.go"
"https://raw.githubusercontent.com/evanw/esbuild/master/pkg/cli/cli_impl.go"
);
"https://github.com/evanw/esbuild/raw/main/pkg/cli/cli_impl.go"
).then(r => r.text());
let start = text.indexOf("func parseOptionsImpl(");
let working = true;
text = text.slice(start);
Expand Down

0 comments on commit b77cf89

Please sign in to comment.