Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: error when copying custom theme assets files #379

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

tee-moore
Copy link

@tee-moore tee-moore commented Dec 5, 2021

i created a custom theme
but there was an error when running the command php artisan scribe:generate
error while copying css and js files to custom theme: "copy(public/docs/js/tryitout-3.16.0.js): failed to open stream: No such file or directory"

@shalvah
Copy link
Contributor

shalvah commented Dec 7, 2021

Thank you, but this is not the fix. You're almost there, but you can't hardcode it to copy the default js and css. A better solution: in the foreach block some lines down, check if the file exists before trying to copy.

@tee-moore
Copy link
Author

tee-moore commented Dec 9, 2021

sorry, maybe I don't quite understand ..
I hardcoded the default file because it seemed to me that the default file should always be copied from the package, regardless of the theme name ..
if there is a variable, then the file for my theme is not copied ... maybe this is how it should be?

and in the foreach below there is already a check if the file exists

@shalvah
Copy link
Contributor

shalvah commented Dec 21, 2021

Oh, right. I envisioned themes being provided by Scribe, but for user-defined themes, that will be a problem. Accepting this for now, but when we introduce more themes, we'll revisit.

@shalvah shalvah merged commit ec08793 into knuckleswtf:master Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants