Skip to content

Commit

Permalink
Add build to gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
edizcelik committed Dec 17, 2021
1 parent 502f0a2 commit 5831a26
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_STORE
build/
12 changes: 10 additions & 2 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import path from "path";
import { readdir, mkdir } from "fs/promises";
import { readdir, mkdir, rm } from "fs/promises";
import {
existsSync,
mkdirSync,
lstatSync,
readdirSync,
copyFileSync,
} from "fs";
import { buildDirectory, currentDirname } from "./constants.mjs";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);

const ASSET_ID_MATCHER = /\d+/;
const currentDirname = path.dirname(__filename);
const buildDirectory = path.join(currentDirname, "build");

try {
if (existsSync(buildDirectory)) {
await rm(buildDirectory, { recursive: true });
}

await mkdir(buildDirectory);
const files = await readdir(currentDirname);

Expand Down
8 changes: 0 additions & 8 deletions cleanup.mjs

This file was deleted.

10 changes: 0 additions & 10 deletions constants.mjs

This file was deleted.

0 comments on commit 5831a26

Please sign in to comment.