Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,15 @@ jobs:
runs-on: ubuntu-latest

permissions:
id-token: write
contents: read
id-token: write

steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install dependencies
run: npm install
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: deno test --allow-env --allow-read=. --allow-net=api.github.com,0.0.0.0,localhost
- name: Deploy to Deno Deploy
uses: denoland/deployctl@v1
with:
project: dprint-plugins
entrypoint: main.ts
run: npx vitest run
- name: Deploy to Cloudflare Workers
if: github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@v3
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.claude
node_modules
.wrangler
.dev.vars
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

Website for [https://plugins.dprint.dev](https://plugins.dprint.dev).

This website is hosted on [Deno Deploy](https://deno.com/deploy).

## Redirect to Any GitHub Repo (For Plugin Authors)

This service provides a convenient redirect for a plugin stored in any GitHub repo.
This service provides a convenient URL for a plugin stored in any GitHub repo.

To use it, create a GitHub release in your repo with:

Expand All @@ -28,8 +26,27 @@ Restrictions and recommendations:

If your repo name is in the format `dprint-plugin-<something>` then you can omit `dprint-plugin-` in the `<repo_name>` for the redirect (ex. `https://plugins.dprint.dev/<user>/dprint-plugin-typescript-0.0.0.wasm` may be shortened to `https://plugins.dprint.dev/<user>/typescript-0.0.0.wasm`).

## Release Assets

For approved repositories, individual release assets can be served directly via:

```
https://plugins.dprint.dev/<username>/<repo_name>/<tag_name>/asset/<asset_name>
```

For example:

```
https://plugins.dprint.dev/dprint/dprint-plugin-prettier/0.67.0/asset/dprint-plugin-prettier-x86_64-apple-darwin.zip
```

This is useful for process plugins that distribute platform-specific binaries. Assets are cached in R2 for persistence.

Note: To get approved, open a PR to this repository including your username and plugin repo.

## Run Locally

```bash
deno run --allow-read=. --allow-net --allow-env --no-check main.ts
npm install
npm run dev
```
8 changes: 0 additions & 8 deletions deno.json

This file was deleted.

29 changes: 0 additions & 29 deletions deno.lock

This file was deleted.

12 changes: 6 additions & 6 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"**/*-lock.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.88.7.wasm",
"https://plugins.dprint.dev/json-0.19.1.wasm",
"https://plugins.dprint.dev/markdown-0.16.3.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.3.0.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.5.1.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.10.0.wasm"
"https://plugins.dprint.dev/typescript-0.95.15.wasm",
"https://plugins.dprint.dev/json-0.21.3.wasm",
"https://plugins.dprint.dev/markdown-0.21.1.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.6.0.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.15.2.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.27.0.wasm"
]
}
14 changes: 14 additions & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
declare module "*.css" {
const content: string;
export default content;
}

declare module "*.txt" {
const content: string;
export default content;
}

interface Env {
DPRINT_PLUGINS_GH_TOKEN?: string;
PLUGIN_CACHE: R2Bucket;
}
Loading
Loading