-
-
Notifications
You must be signed in to change notification settings - Fork 575
Allow buffalo build to extract assets and put them into a zip file #180
Allow buffalo build to extract assets and put them into a zip file #180
Conversation
Signed-off-by: Stanislas Michalak <stanislas.michalak@gmail.com>
Signed-off-by: Stanislas Michalak <stanislas.michalak@gmail.com>
This PR added a "-e" flag to the build command. This flag extracts assets and put them into a zip file, in the bin directory (next to the executable). The bin directory is also cleaned before build. The flag also disable the route handling for assets. You can catch "/assets" queries with NGINX, Apache... and serve them from another location (even from CDN, using a redirect). Further improvements can include a custom function in templates to prefix assets with a custom location, or a default "/assets" path. |
Thanks. I'll pull this down and play with it when I get to my computer. In the mean time @philipithomas did a great PR yesterday fixing some linting issues. I think there a few things that will need to be fixed in here. Can you please run 'docker build .' to make sure everything is good? Thanks. |
Sure. The Docker build succeed:
|
And if I add a new RUN command to test the new option:
|
Ah yes, that is because #189 hasn't been merged yet. There's still 1 outstanding issue with it. I'm waiting for that to be merged before merging other PRs. I'll pull this down and play with it on the plane. |
I got an error:
|
It works if I already have a |
Then we can ensure the If it's not the case, maybe we must put the assets archive in the same location and ensure its existence. |
@stanislas-m there are some conflicts with main, can you resolve them so i can merge? thanks. |
Just saw your questions about the |
Okay! Then I'm going to fix that. |
Place generated assets zip in the output dir.
Hum, I forgot something. Please wait for the merge. :) |
@markbates Seems ok now. |
Great work on this! Sorry it took so long to get merged! |
This PR implements issue #170.