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

Deal with mixed folders #109

Open
dariusj18 opened this issue Aug 14, 2014 · 1 comment
Open

Deal with mixed folders #109

dariusj18 opened this issue Aug 14, 2014 · 1 comment

Comments

@dariusj18
Copy link

I am pretty confused with how cfstatic works. Mostly I am wondering if I just don't follow the correct pattern.

My projects are not as organized as the docs layout, my javascript folder contains subfolders for each dependency I have. For example, fancybox has the javascript and css source files in it's own folder.

So it looks like this

/static/js/fancybox/js/fancybox.js
/static/js/fancybox/css/fancybox.css

There is no file

/static/css/fancybox/css/fancybox.css

I want to say cfstatic.include("/static/js/fancybox/fancybox.css")

Can this be done with cfstatic?

@DominicWatson
Copy link
Contributor

No, unfortunately not. CfStatic is a very opinionated about the structure of your js / css. I started a new project to get over that and a few other problems. Right now, it doesn't have built in pre-compiling (we use Grunt with it), but it does all the per request inclusion stuff (including dependency management):

https://github.com/pixl8/sticker

I plan to not support CfStatic in the future as work shifts to Sticker (which is a much more lightweight and performant approach).

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