Skip to content

Commit

Permalink
chore: update init script for 0.7.0 release (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
lino-levan authored Jul 6, 2023
1 parent a1ed1fa commit 9115589
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions blog_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
assert,
assertEquals,
assertStringIncludes,
} from "https://deno.land/std@0.176.0/testing/asserts.ts";
import { fromFileUrl, join } from "https://deno.land/std@0.176.0/path/mod.ts";
} from "https://deno.land/std@0.193.0/testing/asserts.ts";
import { fromFileUrl, join } from "https://deno.land/std@0.193.0/path/mod.ts";

const BLOG_URL = new URL("./testdata/main.js", import.meta.url).href;
const TESTDATA_PATH = fromFileUrl(new URL("./testdata/", import.meta.url));
Expand Down
10 changes: 5 additions & 5 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// Copyright 2022 the Deno authors. All rights reserved. MIT license.

export { serveDir } from "https://deno.land/std@0.176.0/http/file_server.ts";
export { walk } from "https://deno.land/std@0.176.0/fs/walk.ts";
export { serveDir } from "https://deno.land/std@0.193.0/http/file_server.ts";
export { walk } from "https://deno.land/std@0.193.0/fs/walk.ts";
export {
dirname,
fromFileUrl,
join,
relative,
} from "https://deno.land/std@0.176.0/path/mod.ts";
} from "https://deno.land/std@0.193.0/path/mod.ts";
export {
type ConnInfo,
serve,
} from "https://deno.land/std@0.176.0/http/mod.ts";
export { extract as frontMatter } from "https://deno.land/std@0.176.0/encoding/front_matter/any.ts";
} from "https://deno.land/std@0.193.0/http/mod.ts";
export { extract as frontMatter } from "https://deno.land/std@0.193.0/front_matter/any.ts";

export * as gfm from "https://deno.land/x/gfm@0.2.5/mod.ts";
export { Fragment, h } from "https://deno.land/x/htm@0.1.3/mod.ts";
Expand Down
16 changes: 3 additions & 13 deletions init.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2022 the Deno authors. All rights reserved. MIT license.

import { join, resolve } from "https://deno.land/std@0.176.0/path/mod.ts";
import { join, resolve } from "https://deno.land/std@0.193.0/path/mod.ts";

const HELP = `deno_blog
Expand Down Expand Up @@ -62,16 +62,10 @@ const DENO_JSONC_NAME = "deno.jsonc";
const DENO_JSONC_CONTENTS = `{
"tasks": {
"dev": "deno run --allow-net --allow-read --allow-env --watch main.tsx --dev",
"serve": "deno run --allow-net --allow-read --allow-env --no-check main.tsx",
"serve": "deno run --allow-net --allow-read --allow-env --no-check main.tsx"
},
"importMap": "./import_map.json"
}
`;

const IMPORT_MAP_JSON_NAME = "import_map.json";
const IMPORT_MAP_JSON_CONTENTS = `{
"imports": {
"blog": "https://deno.land/x/blog@0.5.0/blog.tsx"
"blog": "https://deno.land/x/blog@0.7.0/blog.tsx"
}
}
`;
Expand Down Expand Up @@ -106,10 +100,6 @@ async function init(directory: string) {
join(directory, DENO_JSONC_NAME),
DENO_JSONC_CONTENTS,
);
await Deno.writeTextFile(
join(directory, IMPORT_MAP_JSON_NAME),
IMPORT_MAP_JSON_CONTENTS,
);

console.log("Blog initialized, run `deno task dev` to get started.");
}
Expand Down

0 comments on commit 9115589

Please sign in to comment.