From 9769496a575d92f74680aeca0888620c8f48a68c Mon Sep 17 00:00:00 2001 From: Walle Cyril Date: Sun, 18 Oct 2020 21:29:39 +0200 Subject: [PATCH] update __ --- example-deno/file_usage.js | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example-deno/file_usage.js b/example-deno/file_usage.js index fcc871a..f7785ab 100644 --- a/example-deno/file_usage.js +++ b/example-deno/file_usage.js @@ -1,8 +1,9 @@ import { registerWorker, FILE, NO_SUPPORT_ERROR, TIME_OUT_ERROR, work } from "../source/worka.js"; -import { __ } from 'https://deno.land/x/dirname/mod.ts'; +import makeloc from 'https://cdn.deno.land/dirname/versions/1.1.2/raw/mod.ts'//https://x.nest.land/dirname@v1.1.2/mod.ts' -const { __filename, __dirname } = __(import.meta); +const { __dirname, __filename } = makeloc(import.meta) + console.log(`${__dirname}/sort_worka.js`.substr(1)); console.log(`${__dirname}/w.ts`.substr(1)); diff --git a/package.json b/package.json index 25a9e7f..92b77db 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "try": "node --experimental-modules example/index.js 8080", "prepare-node-example": "node --experimental-modules source/decorateWorker.js example-node/sort.js example-node/sort_worka.js", "node-example": "node --experimental-modules example-node/file_usage.js", - "deno-example": "deno example-deno/file_usage.js" + "deno-example": "deno run example-deno/file_usage.js" }, "dependencies": {}, "devDependencies": {