Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ tmp/
vendor/
node_modules/
.docs/
.DS_Store
tmp-*
tmp_*
.DS_Store
3 changes: 1 addition & 2 deletions init/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,7 @@ if (Deno.args.includes("build")) {

const denoJson = {
tasks: {
check:
"deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
check: "deno fmt --check && deno lint && deno check --config deno.json .",
dev: "deno run -A --watch=static/,routes/ dev.ts",
build: "deno run -A dev.ts build",
start: "deno run -A main.ts",
Expand Down
10 changes: 6 additions & 4 deletions init/src/init_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { waitForText } from "../../tests/test_utils.tsx";
import { withChildProcessServer } from "../../tests/test_utils.tsx";

async function withTmpDir(fn: (dir: string) => void | Promise<void>) {
const hash = crypto.randomUUID().replaceAll(/-/g, "");
const dir = path.join(import.meta.dirname!, "..", "..", `tmp_${hash}`);
const dir = await Deno.makeTempDir({ prefix: "fresh-" });
await Deno.mkdir(dir, { recursive: true });

try {
Expand Down Expand Up @@ -135,9 +134,12 @@ Deno.test("init - fmt, lint, and type check project", async () => {
const check = await new Deno.Command(Deno.execPath(), {
args: ["task", "check"],
cwd: dir,
stderr: "inherit",
stdout: "inherit",
stderr: "piped",
stdout: "piped",
}).output();
const out = getStdOutput(check);
// deno-lint-ignore no-console
console.log(out);
expect(check.code).toEqual(0);
});
});
Expand Down
Loading