-
Notifications
You must be signed in to change notification settings - Fork 102
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
Asset Management? #116
Comments
Hi @xmikew and sorry for the slow reply, just a lot going on in you personal life. Honestly this is something I've thought about a lot, particularly since the clear tread is toward more front end work for websites and these type of sites tend to have more complex asset requirements. There'sa bunch of prior art on CPAN (Even I have Catalyst::Controller::Public which I am recommending over the old static plugin). At this moment I don't think any of this stuff belongs in Catalyst core. The things I think we can do:
Right now I think answering those questions is the best thing to do since the common approach today is going to change in no time at all and core is not the place for that kind of thing. As a side note all the bits in Catalyst::Devel, all the helper scripts etc are terribly behind and there's noone interested in adopting. I was thinking to just leverages one of the popular project scaffolding tools in another language to fit the bill but again I haven't had time to review. if you are interested in picking that up, that would be great! |
@xmikew -- you might also want to take a look at Catalyst::Controller::AutoAssets -- this is my solution to the question of asset management (and is RapidApp's, too) and it has worked quite well for our needs |
@jjn1056 Thanks for the insight. The Catalyst::Stack or FullStack or whatever it might be called sounds like a good idea to me! I don't tend to use the scaffolding things so I'm not sure what I might be missing or what is languishing. Catalyst::Helper::* ? @vanstyn I missed your controller on metacpan because I had stopped looking in the controller space since I currently serve all my assets from apache. I see you mention the webserver frontend in the AutoAssets docs. It is very tempting to move asset management into a controller when I see AutoAssets! I was looking around some more to see if I had missed other things and saw that Plack::Middleware::Asset::RubyLike has a preprocessor but doesn't look fully featured. Seems like the perl world might be missing a utility to handle this stuff at build time vs runtime, of I've yet to find it. Thanks for the replies, it seems the suggested path at this time is to do it at runtime and use a Controller (Pubic, AutoAssets etc). I think this is why I was originally looking at File::Assets. - Mike |
What is Catalyst view on static asset management? This is something I always struggled with what to do with a Catalyst app. I do a typical make / make test/ make install for the app and my assets actually get installed in the PERL5LIB directory, which was I was a bit weirded out by at first but now I like that all my assets for my app get packaged up too and it's one cohesive unit. I've heard others just copy the app directory around instead of doing a real "install"
Is this why asset management isn't supported at all? There are packages such as File::Assets and Controller::Combine but assets should be munged at build time. It seems it would be nice if catalyst has some built-in something that would at least concat / uglify / fingerprint js and css. File::Assets gets close but it happens at runtime (and looks like might be abandoned).
I was thinking perhaps Module::Install::Catalyst should be enhanced to support the features of File::Assets plus concat as a good first start but I saw Ether was trying to nudge away from Module::Install so maybe something for whatever the new thing is (i can't remember what it was).
Seems might be good for people that don't also run a nodejs environment and have all the task-runners that handle a lot of this stuff (which is what my plan is).
The text was updated successfully, but these errors were encountered: