Skip to content

Commit dae4ca5

Browse files
authored
Merge pull request #7 from vim-denops/style-change
Style change
2 parents 9513372 + e13dae3 commit dae4ca5

File tree

5 files changed

+37
-14
lines changed

5 files changed

+37
-14
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
11
name: test
22

33
on:
4-
schedule:
5-
- cron: "0 7 * * 0"
64
push:
7-
paths:
8-
- "**.md"
9-
- "**.ts"
10-
- ".github/workflows/test.yml"
11-
- "deno.jsonc"
5+
branches:
6+
- main
127
pull_request:
138
paths:
149
- "**.md"
1510
- "**.ts"
1611
- ".github/workflows/test.yml"
1712
- "deno.jsonc"
13+
workflow_dispatch:
1814

1915
jobs:
2016
check:
2117
strategy:
2218
matrix:
2319
runner:
2420
- ubuntu-latest
25-
version:
21+
deno_version:
2622
- "1.x"
2723
runs-on: ${{ matrix.runner }}
2824
steps:
2925
- uses: actions/checkout@v4
3026
- uses: denoland/setup-deno@v1
3127
with:
32-
deno-version: "${{ matrix.version }}"
28+
deno-version: "${{ matrix.deno_version }}"
3329
- name: Lint check
3430
run: deno lint
3531
- name: Format check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🪐 denops_core
22

3-
[![jsr](https://img.shields.io/jsr/v/%40denops/core?logo=javascript&logoColor=white)](https://jsr.io/@denops/core)
3+
[![JSR](https://jsr.io/badges/@denops/core)](https://jsr.io/@denops/core)
44
[![denoland](https://img.shields.io/github/v/release/vim-denops/deno-denops-core?logo=deno&label=denoland)](https://deno.land/x/denops_core)
55
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/denops_core/mod.ts)
66
[![test](https://github.com/vim-denops/deno-denops/workflows/test/badge.svg)](https://github.com/vim-denops/deno-denops/actions?query=workflow%3Atest)

deno.jsonc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
"version": "0.0.0",
44
"exports": "./mod.ts",
55
"tasks": {
6-
"test": "deno test -A --parallel --shuffle --doc --coverage=.coverage",
7-
"check": "deno check ./**/*.ts",
8-
"coverage": "deno coverage .coverage"
6+
"check": "deno check **/*.ts",
7+
"test": "deno test -A --parallel --shuffle --doc",
8+
"test:coverage": "deno task test --coverage=.coverage",
9+
"coverage": "deno coverage .coverage",
10+
"update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts",
11+
"update:commit": "deno task -q update --commit --pre-commit=fmt,lint"
12+
},
13+
"imports": {
14+
"https://deno.land/x/denops_core@$MODULE_VERSION/": "./"
915
}
1016
}

denops.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,18 @@ export interface Denops {
138138
*/
139139
dispatch(name: string, fn: string, ...args: unknown[]): Promise<unknown>;
140140
}
141+
142+
/**
143+
* Denops's entrypoint definition.
144+
*
145+
* Use this type to ensure the `main` function is properly implemented like
146+
*
147+
* ```ts
148+
* import type { Entrypoint } from "https://deno.land/x/denops_core@$MODULE_VERSION/mod.ts";
149+
*
150+
* export const main: Entrypoint = (denops) => {
151+
* // ...
152+
* }
153+
* ```
154+
*/
155+
export type Entrypoint = (denops: Denops) => void | Promise<void>;

mod.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@
1212
*/
1313

1414
export { BatchError } from "./denops.ts";
15-
export type { Context, Denops, Dispatcher, Meta } from "./denops.ts";
15+
export type {
16+
Context,
17+
Denops,
18+
Dispatcher,
19+
Entrypoint,
20+
Meta,
21+
} from "./denops.ts";

0 commit comments

Comments
 (0)