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

Where do data files go so that parcel will include them? #54

Closed
omgitsraven opened this issue Mar 25, 2019 · 2 comments
Closed

Where do data files go so that parcel will include them? #54

omgitsraven opened this issue Mar 25, 2019 · 2 comments

Comments

@omgitsraven
Copy link

I've switched over to yarn, and the project builds to the point of hosting a seemingly-functional version of the website when I run yarn run start. (And, I know that the github checkout doesn't include the data files.) I ran it with no data files, and tried loading the first map (Luigi Circuit), and then manually downloaded from the real site the path that the XHR request was made to (data/mkwii/beginner_course.szs), and added it to the local data directory, and re-ran yarn run start. But, the XHR acts exactly like before: it supposedly returns 200, but in practice it just redirects to the root, just like it does when the .szs file isn't there (I guess this is some default behaviour of parcel?)

What is the intended way to test the site locally with (some) data files? Have I just got the files in the wrong place, or am I supposed to be viewing the compiled version with something other than yarn run start?

@magcius
Copy link
Owner

magcius commented Mar 25, 2019

There is a symlink from dist/data to data, but git on Windows does not create symlinks by default for some reason. You can delete the random file at dist/data and replace it with a data folder, and put your data files in there.

At some point there I had a better mechanism for Parcel with parcel-bundler/parcel#2461 but they rejected my pull request. I'll make this work at some point.

@omgitsraven
Copy link
Author

That worked, thanks!

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

No branches or pull requests

2 participants