Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 0f90517

Browse files
cut out dependencies to deps.ts
1 parent 8f96bc9 commit 0f90517

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

deps.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * as esbuild from 'https://deno.land/x/esbuild@v0.17.13/mod.js';
2+
export * as cache from 'https://deno.land/x/cache@0.2.13/mod.ts';

mod.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { Loader, Plugin } from 'https://deno.land/x/esbuild@v0.17.13/mod.js';
2-
import * as Cache from 'https://deno.land/x/cache@0.2.13/mod.ts';
1+
import { esbuild } from './deps.ts';
2+
import { cache as Cache } from './deps.ts';
33

44
interface Options {
55
directory?: string;
66
rules?: [{
77
test: RegExp;
8-
loader: Loader | string;
8+
loader: esbuild.Loader | string;
99
}];
1010
}
1111

12-
export function esbuildCachePlugin(options: Options): Plugin {
12+
export function esbuildCachePlugin(options: Options): esbuild.Plugin {
1313
const namespace = 'esbuild-cache-plugin';
1414
if (options.directory) {
1515
Cache.configure({ directory: options.directory });
@@ -65,7 +65,7 @@ export function esbuildCachePlugin(options: Options): Plugin {
6565

6666
return {
6767
contents: await Deno.readTextFile(file.path),
68-
loader: loader as Loader,
68+
loader: loader as esbuild.Loader,
6969
};
7070
});
7171
},

0 commit comments

Comments
 (0)