Every repository with this icon (
Every repository with this icon (
| Description: | JavaScript and CSS Asset Compression for Production Rails Apps edit |
-
The problem:
it is easy to forget to run the build_all rake task this creates hours of chasing one's tail trying to find the bug in deployment for things that worked fine in development.A solution:
Store the most recent datetime of any asset and use that to detect whether anything has been updated since the rake task last ran. Automatically rebuild the assets in this is detected. Two ideas for storing the most recent datetime: 1. As an extension to the file name (eg. base_packaged_200904051314.css)
2. As the actual datetime stamp (last modified) of the of the base_packaged.css fileComments
-
asset_packager not building packages on demand in production environment
0 comments Created 6 months ago by contentfreeI haven't been able to suss out a reason yet - but I have two servers that refuse to build the packages on demand. Rake tasks for creating them work just fine. Have any ideas on debugging them?
Comments
-
If you have a js file that's rendered through a controller, or use the js_named_routes(http://github.com/jsierles/js_named_routes ) plugin, there doesn't seem to be a way to get them packaged.
Perhaps instead of opening files, it could call for the resources the regular way (through a url) then build them from there. That way it would work for absolutely any method of serving resources.
Comments
-
Issue with using inline_attachment when asset packager plugin is installed
1 comment Created 2 months ago by SivakumarHi,
I am new to Rails and my question may be very trivial.
I have asset_packager plugin installed in my app. I installed JasonKing's inline_attachment plugin for sending out emails with inline images. But when I try to send a email I am getting a error message (undefined method 'request') and this error seems to happen in 'compute_public_path' in asset_package_helper class of asset_packager plugin and it is working fine when asset packager is uninstalled.
Is there any workaround for this? Please let me know if you need more details.
Thanks,
Sivakumar.Comments
-
I'm compulsively organized—organized to a fault, some might say—and I was trying to organize my JavaScript files according to the section of the site they pertain to:
javascripts javascripts/application.js javascripts/section1/base.js javascripts/section2/base.js etc.but they don't seem to be loading at all with the configuration I have set up:
--- javascripts: - section1: - application - section1/baseIs there any support for nested assets on the horizon? Or does such a thing already exist and I'm a complete moron?
Any help or just a general reply would be great!
Dallas
Comments
-
I really like your tool and it works great with the default rails cache busting approach of adding a timestamp after ?. However when you use with the amazon CDN the ?timestamp part of the URL is not taken into account.
It would be great if the asset packager could help busting the CDN cache without requiring additional steps to the current workflow. One approach would be to:
1. save the build timestamp into a configuration file, asset_manager_auto.yml
2. create a file with a timestamped name
3. in production when generating the link automatically append the timestamp, for example base_1562827.css, base_1562827.jsI can help with the implementation once we reach a consensus on an approach that works...
Comments
-
I'm using jquery plugins. Each is a separate folder in my javascript directory. These folders contain css files and images that are referred to from the css files.
When asset_packager combined these files the path to the images is not adapted to find the images in their original folder. An example:
Part of my .yml file:
- ../javascripts/tools/stylesGiven the following files
javascript/tools/styles.css => in this file a reference to url(tooltip.png) refers to the following file:
javascript/tools/tooltip.pngAfter packaging the image reference hasn't changed and the image can't be found.
Can this be accomplished?
Thanks
Comments
-
Javascript line continuations in strings causes errors
1 comment Created 4 days ago by jj05vendor/plugins/asset_packager/lib/jsmin.rb:113:in `action': Unterminated string literal (RuntimeError) from vendor/plugins/asset_packager/lib/jsmin.rb:195:in `jsmin' from vendor/plugins/asset_packager/lib/jsmin.rb:205Which is caused by code such as:
styleSheet.addRule( '.typeface-js-selected-text', '-ms-filter: \ "Chroma(color=black) \ progid:DXImageTransform.Microsoft.MaskFilter(Color=white) \ progid:DXImageTransform.Microsoft.MaskFilter(Color=blue) \ alpha(opacity=30)" !important; \ color: black; \ font-family: Modern; \ position: absolute; \ white-space: pre; \ filter: alpha(opacity=0);' );Comments











