Skip to content

Commit 2901ef0

Browse files
committed
bugfix
1 parent 912b16a commit 2901ef0

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ttpg-scripts",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"description": "",
55
"bin": {
66
"ttpg-scripts": "./bin/index.js"

src/commands/dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const runDev = async () => {
2222
Logger.log("Copying Thumbnail");
2323
try {
2424
if (await pathExists(path.resolve("./Thumbnail.png"))) {
25-
await fs.copyFile(path.resolve("./Thumbnail.png"), path.resolve(config.local.ttpg_path, `${config.project.slug}`, "Thumbnail.png"));
25+
await fs.copyFile(path.resolve("./Thumbnail.png"), path.resolve(config.local.ttpg_path, `${config.project.slug}_dev`, "Thumbnail.png"));
2626
}
2727
Logger.success("thumbnail copied");
2828
} catch (e) {

src/commands/watch.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ export const runWatch = async () => {
1818
await fs.mkdir(path.resolve("./dev", `${config.project.slug}_dev`), { recursive: true });
1919
await fs.writeFile(path.resolve("./dev/", `${config.project.slug}_dev`, "Manifest.json"), JSON.stringify(manifest, null, 2), "utf8");
2020
await Promise.all(ASSET_DIRS.map((dir) => fs.symlink(path.resolve("assets", dir), path.resolve("dev", `${config.project.slug}_dev`, dir), "junction")));
21+
22+
Logger.log("Copying Thumbnail");
23+
try {
24+
if (await pathExists(path.resolve("./Thumbnail.png"))) {
25+
await fs.copyFile(path.resolve("./Thumbnail.png"), path.resolve(config.local.ttpg_path, `${config.project.slug}_dev`, "Thumbnail.png"));
26+
}
27+
Logger.success("thumbnail copied");
28+
} catch (e) {
29+
Logger.error("Could not copy thumbnail");
30+
throw e;
31+
}
2132
} catch (e) {
2233
Logger.error("Failed to create dev folder");
2334
throw e;

0 commit comments

Comments
 (0)