Alex222222222222 / CopyClip

MacOS, Linux and Windows Clipboard Management App
MIT License
7 stars 2 forks source link

Add `public` directory to avoid build error #39

Closed LingkKang closed 8 months ago

LingkKang commented 8 months ago

When building (or running in development mode) the app, without public directory under root path, an error will occur:

2024-01-12T16:19:50.561736Z ERROR  error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: error taking canonical path of directory "\\\\?\\E:\\PublicRepo\\CopyClip\\public"     
    2: The system cannot find the file specified. (os error 2)

After this pr, the issue can be resolved:

2024-01-12T16:32:47.351923Z  INFO copying directory path="\\\\?\\E:\\PublicRepo\\CopyClip\\public"

I think this is probably caused by trunk:

https://github.com/Alex222222222222/CopyClip/blob/d88ad40777fb1c7c8ee68e3c398aa7bf72c81a9a/index.html#L8

I tried to remove it. After some crude testing, the app seems still work well.

Probably this is a better approach.

LingkKang commented 8 months ago

Additionally, after either way of fixing, the following step on prerelease-build can be removed:

https://github.com/Alex222222222222/CopyClip/blob/d88ad40777fb1c7c8ee68e3c398aa7bf72c81a9a/.github/workflows/prerelease-build.yml#L126-L128

I can submit a subsequent commit on it if needed.

Alex222222222222 commented 8 months ago

public dir is for resources including images and fonts or other stuff for the frontend. Our project currently does not have such resources. However, all resources for the frontend should go into that dir, if there is any. So, adding one empty .gitignore should work.

Alex222222222222 commented 8 months ago

Additionally, after either way of fixing, the following step on prerelease-build can be removed:

https://github.com/Alex222222222222/CopyClip/blob/d88ad40777fb1c7c8ee68e3c398aa7bf72c81a9a/.github/workflows/prerelease-build.yml#L126-L128

I can submit a subsequent commit on it if needed.

Thanks, that would be nice.

LingkKang commented 8 months ago

public dir is for resources including images and fonts or other stuff for the frontend. Our project currently does not have such resources. However, all resources for the frontend should go into that dir, if there is any.

That makes sence.

I've pushed new commit with updated CI file.