Skip to content

Commit

Permalink
🐛x.x.o(external_interface): fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
akira-toriyama committed Jul 13, 2024
1 parent 77aef5c commit e4bda13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions demo/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { generate } from "../mod.ts";

generate({
dir: {
output: "./output",
template: "./demo/tpl/fruits",
output: `${Deno.cwd()}/output`,
template: `${Deno.cwd()}/demo/tpl/fruits`,
},
replacements: [{
before: "fruits",
Expand Down
8 changes: 1 addition & 7 deletions src/use_case/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ type Generate = (
p: GenerateP,
) => Promise<void>;
export const generate: Generate = async (p) => {
const current = Deno.cwd();

await commands.prepare(p);
await commands.replace(p);
await commands.output({
dir: {
output: `${current}/${p.dir.output}`,
},
});
await commands.output(p);
};

0 comments on commit e4bda13

Please sign in to comment.