Skip to content

Commit

Permalink
fix: use alias via import-map
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Oct 20, 2023
1 parent 16e06dd commit c44e2bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions playground/deno/deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"imports": {
"@intlify/utils": "https://esm.sh/@intlify/utils@0.10.0"
},
"tasks": {
"dev": "deno run --watch main.ts",
"test": "deno test --allow-read=$(which deno) --allow-run --allow-net ./deno.spec.ts"
Expand Down
3 changes: 0 additions & 3 deletions playground/deno/deno.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"version": "3",
"redirects": {
"https://esm.sh/@intlify/utils": "https://esm.sh/@intlify/utils@0.10.0"
},
"remote": {
"https://deno.land/std@0.204.0/assert/_constants.ts": "8a9da298c26750b28b326b297316cdde860bc237533b07e1337c021379e6b2a9",
"https://deno.land/std@0.204.0/assert/_diff.ts": "58e1461cc61d8eb1eacbf2a010932bf6a05b79344b02ca38095f9b805795dc48",
Expand Down
12 changes: 6 additions & 6 deletions playground/deno/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-ignore: this is example
import { getHeaderLanguages } from 'https://esm.sh/@intlify/utils'
import { getHeaderLanguages } from "@intlify/utils";

const port = 8125
const port = 8125;
Deno.serve({
port,
}, (req: Request) => {
const languages = getHeaderLanguages(req)
return new Response(`detect accpect-language: ${languages}`)
})
console.log(`server listening on ${port}`)
const languages = getHeaderLanguages(req);
return new Response(`detect accpect-language: ${languages}`);
});
console.log(`server listening on ${port}`);

0 comments on commit c44e2bb

Please sign in to comment.