Skip to content

Commit

Permalink
chore: move deno path from .deno to deno; update readme (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Jan 4, 2021
1 parent 0ef4620 commit 35bd1f7
Show file tree
Hide file tree
Showing 64 changed files with 15 additions and 11 deletions.
8 changes: 5 additions & 3 deletions README.md
@@ -1,9 +1,11 @@
<div style="text-align:center;"><h1>Discord API Types</h1></div>
# Discord API Types

[![GitHub](https://img.shields.io/github/license/discordjs/discord-api-types)](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
[![npm](https://img.shields.io/npm/v/discord-api-types?color=crimson&logo=npm)](https://www.npmjs.com/package/discord-api-types)
[![deno](https://img.shields.io/npm/v/discord-api-types?color=blue&label=deno&logo=deno)](https://deno.land/x/discord_api_types)
[![Patreon Donate](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Donate%20with%20Patreon&logo=patreon&colorB=F96854&link=https://www.patreon.com/vladfrangu)](https://www.patreon.com/vladfrangu)
[![Ko-fi Donate](https://img.shields.io/badge/kofi-donate-brightgreen.svg?label=Donate%20with%20Ko-fi&logo=ko-fi&colorB=F16061&link=https://ko-fi.com/wolfgalvlad&logoColor=FFFFFF)](https://ko-fi.com/wolfgalvlad)
[![GitHub Sponsors](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Sponsor%20through%20GitHub&logo=github&colorB=F96854&link=https://github.com/sponsors/vladfrangu)](https://github.com/sponsors/vladfrangu)

Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).

Expand All @@ -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)
Expand Down
File renamed without changes.
8 changes: 5 additions & 3 deletions .deno/README.md → deno/README.md
@@ -1,9 +1,11 @@
<div style="text-align:center;"><h1>Discord API Types</h1></div>
# Discord API Types

[![GitHub](https://img.shields.io/github/license/discordjs/discord-api-types)](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
[![npm](https://img.shields.io/npm/v/discord-api-types?color=crimson&logo=npm)](https://www.npmjs.com/package/discord-api-types)
[![deno](https://img.shields.io/npm/v/discord-api-types?color=blue&label=deno&logo=deno)](https://deno.land/x/discord_api_types)
[![Patreon Donate](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Donate%20with%20Patreon&logo=patreon&colorB=F96854&link=https://www.patreon.com/vladfrangu)](https://www.patreon.com/vladfrangu)
[![Ko-fi Donate](https://img.shields.io/badge/kofi-donate-brightgreen.svg?label=Donate%20with%20Ko-fi&logo=ko-fi&colorB=F16061&link=https://ko-fi.com/wolfgalvlad&logoColor=FFFFFF)](https://ko-fi.com/wolfgalvlad)
[![GitHub Sponsors](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Sponsor%20through%20GitHub&logo=github&colorB=F96854&link=https://github.com/sponsors/vladfrangu)](https://github.com/sponsors/vladfrangu)

Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).

Expand All @@ -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)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -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",
Expand All @@ -47,7 +47,7 @@
"common/*",
"!**/*.ts",
"**/*.d.ts",
"!\\.deno/*"
"!deno/*"
],
"engines": {
"node": ">=12"
Expand Down
4 changes: 2 additions & 2 deletions scripts/deno.mjs
Expand Up @@ -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);

/**
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Expand Up @@ -4,5 +4,5 @@
"allowJs": true,
"checkJs": true
},
"include": ["common", "default", "v6", "v8", "scripts"]
"include": ["common", "default", "v6", "v8", "scripts", "deno"]
}

0 comments on commit 35bd1f7

Please sign in to comment.