Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobMayer committed Oct 28, 2023
1 parent 912b16a commit 2901ef0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ttpg-scripts",
"version": "1.4.2",
"version": "1.4.3",
"description": "",
"bin": {
"ttpg-scripts": "./bin/index.js"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const runDev = async () => {
Logger.log("Copying Thumbnail");
try {
if (await pathExists(path.resolve("./Thumbnail.png"))) {
await fs.copyFile(path.resolve("./Thumbnail.png"), path.resolve(config.local.ttpg_path, `${config.project.slug}`, "Thumbnail.png"));
await fs.copyFile(path.resolve("./Thumbnail.png"), path.resolve(config.local.ttpg_path, `${config.project.slug}_dev`, "Thumbnail.png"));
}
Logger.success("thumbnail copied");
} catch (e) {
Expand Down
11 changes: 11 additions & 0 deletions src/commands/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ export const runWatch = async () => {
await fs.mkdir(path.resolve("./dev", `${config.project.slug}_dev`), { recursive: true });
await fs.writeFile(path.resolve("./dev/", `${config.project.slug}_dev`, "Manifest.json"), JSON.stringify(manifest, null, 2), "utf8");
await Promise.all(ASSET_DIRS.map((dir) => fs.symlink(path.resolve("assets", dir), path.resolve("dev", `${config.project.slug}_dev`, dir), "junction")));

Logger.log("Copying Thumbnail");
try {
if (await pathExists(path.resolve("./Thumbnail.png"))) {
await fs.copyFile(path.resolve("./Thumbnail.png"), path.resolve(config.local.ttpg_path, `${config.project.slug}_dev`, "Thumbnail.png"));
}
Logger.success("thumbnail copied");
} catch (e) {
Logger.error("Could not copy thumbnail");
throw e;
}
} catch (e) {
Logger.error("Failed to create dev folder");
throw e;
Expand Down

0 comments on commit 2901ef0

Please sign in to comment.