Skip to content

Commit

Permalink
fix: write .gitignore file to output folder
Browse files Browse the repository at this point in the history
  • Loading branch information
henryhale committed Jan 17, 2024
1 parent bc287f6 commit 26258d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

import { copy } from "fs-extra";
import { copy, outputFile } from "fs-extra";
import { join, dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { log, error } from "node:console";
Expand All @@ -13,7 +13,7 @@ const src = join(dirname(fileURLToPath(import.meta.url)), "../starter");
async function createProject() {
try {
await copy(src, dest);
await copy(`${src}/.gitignore`, `${dest}/.gitignore`);
await outputFile(`${dest}/.gitignore`, 'node_modules\ndist\n.unit');
log(green(`[y] ${dest} created successfully! 🎉`));
} catch (err) {
error(red("[x] error creating project: " + err));
Expand Down

0 comments on commit 26258d4

Please sign in to comment.