chore: wipe legacy codebase for complete project restart

This commit is contained in:
leonardo committed 2026-09-16 21:50:39 +00:00
1 parent a90af21a8c
commit e94410f388
11161 files changed
+1628844 -2097

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
import type { Flags } from '../flags.js';
interface DocsOptions {
flags: Flags;
}
export declare function docs({ flags }: DocsOptions): Promise<import("tinyexec").Output | undefined>;
export {};
+18
View File
@@ -0,0 +1,18 @@
import { printHelp } from "../../core/messages.js";
import { openInBrowser } from "./open.js";
async function docs({ flags }) {
if (flags.help || flags.h) {
printHelp({
commandName: "astro docs",
tables: {
Flags: [["--help (-h)", "See all available flags."]]
},
description: `Launches the Astro Docs website directly from the terminal.`
});
return;
}
return await openInBrowser("https://docs.astro.build/");
}
export {
docs
};
+2
View File
@@ -0,0 +1,2 @@
import type { Result } from 'tinyexec';
export declare function openInBrowser(url: string): Promise<Result>;
+28
View File
@@ -0,0 +1,28 @@
import { exec } from "../exec.js";
const getPlatformSpecificCommand = () => {
const isGitPod = Boolean(process.env.GITPOD_REPO_ROOT);
const platform = isGitPod ? "gitpod" : process.platform;
switch (platform) {
case "android":
case "linux":
return ["xdg-open"];
case "darwin":
return ["open"];
case "win32":
return ["cmd", ["/c", "start"]];
case "gitpod":
return ["/ide/bin/remote-cli/gitpod-code", ["--openExternal"]];
default:
throw new Error(
`It looks like your platform ("${platform}") isn't supported!
To view Astro's docs, please visit https://docs.astro.build`
);
}
};
async function openInBrowser(url) {
const [command, args = []] = getPlatformSpecificCommand();
return exec(command, [...args, encodeURI(url)]);
}
export {
openInBrowser
};