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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (better) support for nested assets #88

merged 4 commits into from Jun 14, 2018


None yet
2 participants
Copy link

katafrakt commented Mar 5, 2018

This addresses #79 and obsoletes #82.

To recap:

This PR adds a concept of base_directories which are by default stylesheets, javascripts, fonts and images. Nested assets (for example semanticui/main.css are first looked in those directories (i.e. stylesheets/semanticui/main.css, javascripts/semanticui/main.css etc.) and when found, they are copied info public/assets without prefix (as semanticui/main.css).

Of course you can define your own base_directories.

path compiled to
web/assets/style.css public/assets/style.css
web/assets/stylesheets/style.css public/assets/style.css
web/assets/foo/bar/style.css public/assets/foo/bar/style.css
web/assets/javascripts/bootstrap/main.js public/assets/bootstrap/main.js

Conflict resolution

What happens when we have stylesheets/foo/main.css and foo/main.css? This is not handled in this PR as it is also not handled right now. I think this issue should be addressed at some point too (probably throw an exception when there are such conflicting assets).

Final remarks

I would still like to add more programmatic tests and perform some manual tests, but I'm open for comments and discussion right now 馃槈


This comment has been minimized.

Copy link

katafrakt commented Mar 6, 2018

Manual tests done and looking good.


This comment has been minimized.

Copy link

katafrakt commented May 24, 2018

So, what about this? 馃槈

@jodosha jodosha self-assigned this Jun 14, 2018

@jodosha jodosha modified the milestones: v1.3.0, v2.0.0 Jun 14, 2018


This comment has been minimized.

Copy link

jodosha commented Jun 14, 2018

@katafrakt Hi, code LGTM 馃憤 Thanks for all this work and the patience. Sending hugs. 馃挴

@jodosha jodosha merged commit c876b65 into hanami:develop Jun 14, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@jodosha jodosha added the enhancement label Jun 14, 2018

@jodosha jodosha modified the milestones: v2.0.0, v1.3.0 Aug 3, 2018

@katafrakt katafrakt deleted the katafrakt:nested-assets-2.0 branch Aug 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment