Skip to content

Commit 1ce1744

Browse files
committed
📝 Use $MODULE_VERSION in docs
1 parent 19db68a commit 1ce1744

File tree

30 files changed

+165
-173
lines changed

30 files changed

+165
-173
lines changed

argument/flags.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const shortPattern = /^-([a-zA-Z0-9])(.*)/;
99
* Parse string array to extract flags (-f/--flag).
1010
*
1111
* ```typescript
12-
* import type { Denops } from "../mod.ts";
13-
* import { parseFlags } from "./mod.ts";
12+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
13+
* import { parseFlags } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
1414
*
1515
* export async function main(denops: Denops): Promise<void> {
1616
* const args = [
@@ -66,8 +66,8 @@ export function parseFlags(args: string[]): [Flags, string[]] {
6666
* Validate if `flags` has unknown attributes.
6767
*
6868
* ```typescript
69-
* import type { Denops } from "../mod.ts";
70-
* import { parse, validateFlags } from "./mod.ts";
69+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
70+
* import { parse, validateFlags } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
7171
*
7272
* export async function main(denops: Denops): Promise<void> {
7373
* const args = [
@@ -102,8 +102,8 @@ export function validateFlags(flags: Flags, knownAttributes: string[]): void {
102102
* Format `key` and `value` to construct string array.
103103
*
104104
* ```typescript
105-
* import type { Denops } from "../mod.ts";
106-
* import { formatFlag } from "./mod.ts";
105+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
106+
* import { formatFlag } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
107107
*
108108
* export async function main(denops: Denops): Promise<void> {
109109
* console.log(formatFlag("f", ""));
@@ -133,8 +133,8 @@ export function formatFlag(
133133
* Format `flags` to construct string array.
134134
*
135135
* ```typescript
136-
* import type { Denops } from "../mod.ts";
137-
* import { formatFlags, parse } from "./mod.ts";
136+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
137+
* import { formatFlags, parse } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
138138
*
139139
* export async function main(denops: Denops): Promise<void> {
140140
* const args = [

argument/mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
* Then, developers can use this module to parse, validate, or format the arguments.
1818
*
1919
* ```typescript
20-
* import type { Denops } from "../mod.ts";
20+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
2121
* import {
2222
* builtinOpts,
2323
* formatFlags,
2424
* formatOpts,
2525
* parse,
2626
* validateFlags,
2727
* validateOpts,
28-
* } from "./mod.ts";
28+
* } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
2929
*
3030
* export async function main(denops: Denops): Promise<void> {
3131
* denops.dispatcher = {
@@ -69,8 +69,8 @@ import { Flags, parseFlags } from "./flags.ts";
6969
* Parse string array to extract opts, flags.
7070
*
7171
* ```typescript
72-
* import type { Denops } from "../mod.ts";
73-
* import { parse } from "./mod.ts";
72+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
73+
* import { parse } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
7474
*
7575
* export async function main(denops: Denops): Promise<void> {
7676
* const args = [

argument/opts.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const optPattern = /^\+\+([a-zA-Z0-9-]+)(?:=(.*))?/;
2424
* Parse string array to extract opts (++opt).
2525
*
2626
* ```typescript
27-
* import type { Denops } from "../mod.ts";
28-
* import { parseOpts } from "./mod.ts";
27+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
28+
* import { parseOpts } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
2929
*
3030
* export async function main(denops: Denops): Promise<void> {
3131
* const args = [
@@ -77,8 +77,8 @@ export function parseOpts(args: string[]): [Opts, string[]] {
7777
* Validate if `opts` has unknown attributes.
7878
*
7979
* ```typescript
80-
* import type { Denops } from "../mod.ts";
81-
* import { builtinOpts, parse, validateOpts } from "./mod.ts";
80+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
81+
* import { builtinOpts, parse, validateOpts } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
8282
*
8383
* export async function main(denops: Denops): Promise<void> {
8484
* const args = [
@@ -112,8 +112,8 @@ export function validateOpts(opts: Opts, knownAttributes: string[]): void {
112112
* Format `key` and `value` to construct string array.
113113
*
114114
* ```typescript
115-
* import type { Denops } from "../mod.ts";
116-
* import { formatOpt } from "./mod.ts";
115+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
116+
* import { formatOpt } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
117117
*
118118
* export async function main(denops: Denops): Promise<void> {
119119
* console.log(formatOpt("enc", "sjis"));
@@ -132,8 +132,8 @@ export function formatOpt(key: string, value: string | undefined): string[] {
132132
* Format `opts` to construct string array.
133133
*
134134
* ```typescript
135-
* import type { Denops } from "../mod.ts";
136-
* import { formatOpts, parse } from "../argument/mod.ts";
135+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
136+
* import { formatOpts, parse } from "https://deno.land/x/denops_std@$MODULE_VERSION/argument/mod.ts";
137137
*
138138
* export async function main(denops: Denops): Promise<void> {
139139
* const args = [

autocmd/common.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { buildDefineExpr, buildRemoveExpr } from "./utils.ts";
1212
* Define an autocmd
1313
*
1414
* ```typescript
15-
* import type { Denops } from "../mod.ts";
16-
* import * as autocmd from "./mod.ts";
15+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
16+
* import * as autocmd from "https://deno.land/x/denops_std@$MODULE_VERSION/autocmd/mod.ts";
1717
*
1818
* export async function main(denops: Denops): Promise<void> {
1919
* // Define new autocmd for BufEnter
@@ -54,8 +54,8 @@ export async function define(
5454
* Remove an autocmd
5555
*
5656
* ```typescript
57-
* import type { Denops } from "../mod.ts";
58-
* import * as autocmd from "./mod.ts";
57+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
58+
* import * as autocmd from "https://deno.land/x/denops_std@$MODULE_VERSION/autocmd/mod.ts";
5959
*
6060
* export async function main(denops: Denops): Promise<void> {
6161
* // Remove BufEnter autocmd
@@ -88,8 +88,8 @@ export async function remove(
8888
* List defined autocmds
8989
*
9090
* ```typescript
91-
* import type { Denops } from "../mod.ts";
92-
* import * as autocmd from "./mod.ts";
91+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
92+
* import * as autocmd from "https://deno.land/x/denops_std@$MODULE_VERSION/autocmd/mod.ts";
9393
*
9494
* export async function main(denops: Denops): Promise<void> {
9595
* // List all autocmd
@@ -138,8 +138,8 @@ export async function list(
138138
* Emit an autocmd in a buffer
139139
*
140140
* ```typescript
141-
* import type { Denops } from "../mod.ts";
142-
* import * as autocmd from "./mod.ts";
141+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
142+
* import * as autocmd from "https://deno.land/x/denops_std@$MODULE_VERSION/autocmd/mod.ts";
143143
*
144144
* export async function main(denops: Denops): Promise<void> {
145145
* // Emit an autocmd in a current buffer
@@ -182,8 +182,8 @@ export async function emit(
182182
* Emit an autocmd in all buffers
183183
*
184184
* ```typescript
185-
* import type { Denops } from "../mod.ts";
186-
* import * as autocmd from "./mod.ts";
185+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
186+
* import * as autocmd from "https://deno.land/x/denops_std@$MODULE_VERSION/autocmd/mod.ts";
187187
*
188188
* export async function main(denops: Denops): Promise<void> {
189189
* // Emit an autocmd in all buffers

autocmd/group.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export type GroupRemoveOptions = Omit<RemoveOptions, "group">;
1010
* Create an autocmd group and define/remove autocmds in that group.
1111
*
1212
* ```typescript
13-
* import type { Denops } from "../mod.ts";
14-
* import { group } from "./group.ts";
13+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
14+
* import { group } from "https://deno.land/x/denops_std@$MODULE_VERSION/autocmd/mod.ts";
1515
*
1616
* export async function main(denops: Denops): Promise<void> {
1717
* await group(denops, "my-autocmd", (helper) => {

batch/batch.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class BatchHelper implements Denops {
9393
* Call multiple denops functions sequentially without RPC overhead
9494
*
9595
* ```typescript
96-
* import type { Denops } from "../mod.ts";
96+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
9797
* import { batch } from "./batch.ts";
9898
*
9999
* export async function main(denops: Denops): Promise<void> {
@@ -109,7 +109,7 @@ class BatchHelper implements Denops {
109109
* `batch()` like:
110110
*
111111
* ```typescript
112-
* import type { Denops } from "../mod.ts";
112+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
113113
* import { batch } from "./batch.ts";
114114
*
115115
* async function replace(denops: Denops, content: string): Promise<void> {
@@ -134,7 +134,7 @@ class BatchHelper implements Denops {
134134
* falsy value in `batch()`, indicating that you **cannot** write code like below:
135135
*
136136
* ```typescript
137-
* import type { Denops } from "../mod.ts";
137+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
138138
* import { batch } from "./batch.ts";
139139
*
140140
* export async function main(denops: Denops): Promise<void> {
@@ -153,9 +153,9 @@ class BatchHelper implements Denops {
153153
* like:
154154
*
155155
* ```typescript
156-
* import type { Denops } from "../mod.ts";
156+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
157157
* import { batch } from "./batch.ts";
158-
* import * as lambda from "../lambda/mod.ts";
158+
* import * as lambda from "https://deno.land/x/denops_std@$MODULE_VERSION/lambda/mod.ts";
159159
*
160160
* export async function main(denops: Denops): Promise<void> {
161161
* await batch(denops, async (denops) => {

batch/collect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class CollectHelper implements Denops {
8686
* Call multiple denops functions sequentially without RPC overhead and return values
8787
*
8888
* ```typescript
89-
* import type { Denops } from "../mod.ts";
89+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
9090
* import { collect } from "./collect.ts";
9191
*
9292
* export async function main(denops: Denops): Promise<void> {
@@ -105,7 +105,7 @@ class CollectHelper implements Denops {
105105
* `collect()`, indicating that you **cannot** write code like below:
106106
*
107107
* ```typescript
108-
* import type { Denops } from "../mod.ts";
108+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
109109
* import { collect } from "./collect.ts";
110110
*
111111
* export async function main(denops: Denops): Promise<void> {

buffer/buffer.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ async function ensurePrerequisites(denops: Denops): Promise<string> {
134134
* Open a `bufname` buffer with given options on the current window
135135
*
136136
* ```typescript
137-
* import type { Denops } from "../mod.ts";
138-
* import { open } from "../buffer/mod.ts";
137+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
138+
* import { open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
139139
*
140140
* export async function main(denops: Denops): Promise<void> {
141141
* // Open `README.md`
@@ -155,8 +155,8 @@ async function ensurePrerequisites(denops: Denops): Promise<string> {
155155
* the option like:
156156
*
157157
* ```typescript
158-
* import type { Denops } from "../mod.ts";
159-
* import { open } from "../buffer/mod.ts";
158+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
159+
* import { open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
160160
*
161161
* export async function main(denops: Denops): Promise<void> {
162162
* await open(denops, "README.md", { opener: "split" });
@@ -167,8 +167,8 @@ async function ensurePrerequisites(denops: Denops): Promise<string> {
167167
* tabpage number like:
168168
*
169169
* ```typescript
170-
* import type { Denops } from "../mod.ts";
171-
* import { open } from "../buffer/mod.ts";
170+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
171+
* import { open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
172172
*
173173
* export async function main(denops: Denops): Promise<void> {
174174
* const info = await open(denops, "README.md");
@@ -217,9 +217,9 @@ export interface OpenResult {
217217
* Reload the content of the `bufnr` buffer
218218
*
219219
* ```typescript
220-
* import type { Denops } from "../mod.ts";
221-
* import * as fn from "../function/mod.ts";
222-
* import { open, reload } from "../buffer/mod.ts";
220+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
221+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
222+
* import { open, reload } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
223223
*
224224
* export async function main(denops: Denops): Promise<void> {
225225
* await open(denops, "README.md");
@@ -245,9 +245,9 @@ export async function reload(denops: Denops, bufnr: number): Promise<void> {
245245
* Decode raw binary content for string array for the `bufnr` buffer
246246
*
247247
* ```typescript
248-
* import type { Denops } from "../mod.ts";
249-
* import * as fn from "../function/mod.ts";
250-
* import { decode, open, replace } from "../buffer/mod.ts";
248+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
249+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
250+
* import { decode, open, replace } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
251251
*
252252
* export async function main(denops: Denops): Promise<void> {
253253
* await open(denops, "README.md");
@@ -309,9 +309,9 @@ export interface DecodeResult {
309309
* Append content under the current cursor position or given lnum of the buffer
310310
*
311311
* ```typescript
312-
* import type { Denops } from "../mod.ts";
313-
* import * as fn from "../function/mod.ts";
314-
* import { append, open } from "../buffer/mod.ts";
312+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
313+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
314+
* import { append, open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
315315
*
316316
* export async function main(denops: Denops): Promise<void> {
317317
* await open(denops, "README.md");
@@ -349,9 +349,9 @@ export interface AppendOptions {
349349
* Replace the content of the `bufnr` buffer
350350
*
351351
* ```typescript
352-
* import type { Denops } from "../mod.ts";
353-
* import * as fn from "../function/mod.ts";
354-
* import { open, replace } from "../buffer/mod.ts";
352+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
353+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
354+
* import { open, replace } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
355355
*
356356
* export async function main(denops: Denops): Promise<void> {
357357
* await open(denops, "README.md");
@@ -397,9 +397,9 @@ export interface ReplaceOptions {
397397
* this function to concrete the content of such buffer to prevent this discard.
398398
*
399399
* ```typescript
400-
* import type { Denops } from "../mod.ts";
401-
* import * as fn from "../function/mod.ts";
402-
* import { concrete, open, replace } from "../buffer/mod.ts";
400+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
401+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
402+
* import { concrete, open, replace } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
403403
*
404404
* export async function main(denops: Denops): Promise<void> {
405405
* await open(denops, "README.md");
@@ -447,10 +447,10 @@ export async function concrete(
447447
* Ensure the executor is executed under the specified buffer
448448
*
449449
* ```typescript
450-
* import type { Denops } from "../mod.ts";
451-
* import * as option from "../option/mod.ts";
452-
* import * as fn from "../function/mod.ts";
453-
* import { ensure, open } from "../buffer/mod.ts";
450+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
451+
* import * as option from "https://deno.land/x/denops_std@$MODULE_VERSION/option/mod.ts";
452+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
453+
* import { ensure, open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
454454
*
455455
* export async function main(denops: Denops): Promise<void> {
456456
* await open(denops, "README.md");
@@ -504,9 +504,9 @@ export async function ensure<T>(
504504
* Ensure the executor is executed under a modifiable buffer
505505
*
506506
* ```typescript
507-
* import type { Denops } from "../mod.ts";
508-
* import * as fn from "../function/mod.ts";
509-
* import { modifiable, open } from "../buffer/mod.ts";
507+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
508+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
509+
* import { modifiable, open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
510510
*
511511
* export async function main(denops: Denops): Promise<void> {
512512
* await open(denops, "README.md");

buffer/decoration.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export interface Decoration {
2222
* Decorate the specified buffer with decorations
2323
*
2424
* ```typescript
25-
* import type { Denops } from "../mod.ts";
26-
* import * as fn from "../function/mod.ts";
27-
* import { decorate, open } from "../buffer/mod.ts";
25+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
26+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
27+
* import { decorate, open } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
2828
*
2929
* export async function main(denops: Denops): Promise<void> {
3030
* await open(denops, "README.md");
@@ -69,9 +69,9 @@ export function decorate(
6969
* Undecorate the specified buffer
7070
*
7171
* ```typescript
72-
* import type { Denops } from "../mod.ts";
73-
* import * as fn from "../function/mod.ts";
74-
* import { decorate, open, undecorate } from "../buffer/mod.ts";
72+
* import type { Denops } from "https://deno.land/x/denops_std@$MODULE_VERSION/mod.ts";
73+
* import * as fn from "https://deno.land/x/denops_std@$MODULE_VERSION/function/mod.ts";
74+
* import { decorate, open, undecorate } from "https://deno.land/x/denops_std@$MODULE_VERSION/buffer/mod.ts";
7575
*
7676
* export async function main(denops: Denops): Promise<void> {
7777
* await open(denops, "README.md");

0 commit comments

Comments
 (0)