-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add `docs` command Allows for opening the Solid docs in the browser
- Loading branch information
Showing
7 changed files
with
58 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
type RuntimeName = "Bun" | "Node" | "Deno" | ||
type Runtime = { name: RuntimeName, version: string } | ||
type RuntimeName = "Bun" | "Node" | "Deno"; | ||
type Runtime = { name: RuntimeName; version: string }; | ||
declare global { | ||
var Bun: { version: string } | undefined | ||
var Deno: { version: { deno: string } } | undefined | ||
var Bun: { version: string } | undefined; | ||
var Deno: { version: { deno: string } } | undefined; | ||
} | ||
export const detectRuntime = (): Runtime => { | ||
if (globalThis.Bun) { | ||
return { name: "Bun", version: globalThis.Bun?.version } | ||
} | ||
if (globalThis.Deno) { | ||
return { name: "Deno", version: globalThis.Deno?.version?.deno } | ||
} | ||
// @ts-ignore | ||
if (typeof process !== undefined && !!process.versions?.node) { | ||
// @ts-ignore | ||
return { name: "Node", version: process?.version } | ||
} | ||
throw new Error("Unable to detect") | ||
} | ||
if (globalThis.Bun) { | ||
return { name: "Bun", version: globalThis.Bun?.version }; | ||
} | ||
if (globalThis.Deno) { | ||
return { name: "Deno", version: globalThis.Deno?.version?.deno }; | ||
} | ||
// @ts-ignore | ||
if (typeof process !== undefined && !!process.versions?.node) { | ||
// @ts-ignore | ||
return { name: "Node", version: process?.version }; | ||
} | ||
throw new Error("Unable to detect"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { defineCommand } from "citty"; | ||
|
||
export const startCommands = defineCommand({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.