mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-01 16:30:10 +00:00
chore: move deno path from .deno to deno; update readme (#67)
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<div style="text-align:center;"><h1>Discord API Types</h1></div>
|
||||
# Discord API Types
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
|
||||
[](https://www.npmjs.com/package/discord-api-types)
|
||||
[](https://deno.land/x/discord_api_types)
|
||||
[](https://www.patreon.com/vladfrangu)
|
||||
[](https://ko-fi.com/wolfgalvlad)
|
||||
[](https://github.com/sponsors/vladfrangu)
|
||||
|
||||
Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
@@ -23,10 +25,10 @@ We also provide typings compatible with the [deno](https://deno.land/) runtime.
|
||||
|
||||
```ts
|
||||
// Importing the default API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/.deno/mod.ts';
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/mod.ts';
|
||||
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/.deno/v8/mod.ts';
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v8/mod.ts';
|
||||
```
|
||||
|
||||
2. From [deno.land/x](https://deno.land/x)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<div style="text-align:center;"><h1>Discord API Types</h1></div>
|
||||
# Discord API Types
|
||||
|
||||
[](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
|
||||
[](https://www.npmjs.com/package/discord-api-types)
|
||||
[](https://deno.land/x/discord_api_types)
|
||||
[](https://www.patreon.com/vladfrangu)
|
||||
[](https://ko-fi.com/wolfgalvlad)
|
||||
[](https://github.com/sponsors/vladfrangu)
|
||||
|
||||
Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
|
||||
|
||||
@@ -23,10 +25,10 @@ We also provide typings compatible with the [deno](https://deno.land/) runtime.
|
||||
|
||||
```ts
|
||||
// Importing the default API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/.deno/mod.ts';
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/mod.ts';
|
||||
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/.deno/v8/mod.ts';
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v8/mod.ts';
|
||||
```
|
||||
|
||||
2. From [deno.land/x](https://deno.land/x)
|
||||
@@ -31,7 +31,7 @@
|
||||
"test:lint": "eslint --ext mjs,js,ts {v*,default,common}/**",
|
||||
"clean": "run-p clean:*",
|
||||
"clean:node": "rimraf {v*,default,common}/**/*.{js,mjs,d.ts,map}",
|
||||
"clean:deno": "rimraf .deno/"
|
||||
"clean:deno": "rimraf deno/"
|
||||
},
|
||||
"keywords": [
|
||||
"discord",
|
||||
@@ -47,7 +47,7 @@
|
||||
"common/*",
|
||||
"!**/*.ts",
|
||||
"**/*.d.ts",
|
||||
"!\\.deno/*"
|
||||
"!deno/*"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
|
||||
@@ -9,14 +9,14 @@ import {
|
||||
} from 'fs/promises';
|
||||
|
||||
const baseDirectory = new URL('../', import.meta.url);
|
||||
const denoPath = new URL('.deno/', baseDirectory);
|
||||
const denoPath = new URL('deno/', baseDirectory);
|
||||
|
||||
// Remove existing deno built files
|
||||
try {
|
||||
await rm(denoPath, { recursive: true });
|
||||
} catch {}
|
||||
|
||||
// Create .deno folder
|
||||
// Create deno folder
|
||||
await mkdir(denoPath);
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
"allowJs": true,
|
||||
"checkJs": true
|
||||
},
|
||||
"include": ["common", "default", "v6", "v8", "scripts"]
|
||||
"include": ["common", "default", "v6", "v8", "scripts", "deno"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user