More plugin examples. Clipboard, promise helpers, environment

This commit is contained in:
Exidex 2025-04-27 20:12:17 +02:00
parent affeccceb1
commit 417ed8a13a
No known key found for this signature in database
GPG key ID: AC63AA86DD4F2D45
27 changed files with 812 additions and 1 deletions

View file

@ -0,0 +1,2 @@
dist
node_modules

View file

@ -0,0 +1,13 @@
[gauntlet]
name = 'Docs Command Environment'
description = ''
# docs-code-segment:start environment
[[entrypoint]]
id = 'environment'
name = 'Environment'
path = 'src/environment.tsx'
type = 'command'
description = ''
# docs-code-segment:end

View file

@ -0,0 +1,17 @@
{
"name": "@project-gauntlet/docs-command-environment",
"private": true,
"scripts": {
"build": "gauntlet build",
"dev": "gauntlet dev"
},
"dependencies": {
"@project-gauntlet/api": "file:../../js/api"
},
"devDependencies": {
"@types/react": "*",
"@types/deno": "*",
"@project-gauntlet/tools": "*",
"typescript": "*"
}
}

View file

@ -0,0 +1,8 @@
import { Environment } from "@project-gauntlet/api/helpers";
export default function Command() {
console.log(Environment.gauntletVersion)
console.log(Environment.isDevelopment)
console.log(Environment.pluginDataDir)
console.log(Environment.pluginCacheDir)
}

View file

@ -0,0 +1,11 @@
{
"compilerOptions": {
"strict": true,
"module": "ES2022",
"esModuleInterop": true,
"target": "ES2022",
"moduleResolution": "bundler",
"jsx": "react-jsx"
},
"lib": ["ES2020"]
}