SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    Location
    Quincy
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Glueing together multiple css and js files into one?

    In the java world I use jawr, which allows me to define "modules" consisting of many javascript files and many css files. It then strings these together, minifies them, and gzips them automatically.

    I really enjoy using it because it always gets me an A in Y slow and reduces overhead caused by including many small js/css files. Anyway, is there something similar that exists for ruby? Or a RoR plugin?

    Thanks

    James Carr, Software Engineer


    assertEquals(newXPJob, you.ask(officeOfTheLaw));

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a look at the AssetPacker plug-in.

    If you're trying to improve performance you may be interested in this:

    http://www.slashdotdash.net/2007/07/...p-using-yslow/

  3. #3
    SitePoint Enthusiast TomK32's Avatar
    Join Date
    Mar 2008
    Location
    Berchtesgaden, Germany
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    James, you should read the API docs better.

    It's dead simple:
    Code:
    javascript_include_tag('file1', 'file2', :cache => true)
    Btw, if you are smart you do :cache => 'cache/application.css' cuz this evil thing overwrites your files.
    just a geek trying to change the world
    I'm a ruby on rails developer in Vienna, Austria. My github.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •