Code Monkey home page Code Monkey logo

asset_packager's People

Contributors

bschwartz avatar eandrejko avatar erikstmartin avatar rainux avatar sbecker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

asset_packager's Issues

Problem using this forked plugin on windows

Line

system("java -jar #{yui_path}/yuicompressor-2.4.2.jar --type js -v #{full_asset_path(s)} >/dev/null")

can be changed

system("java -jar #{yui_path}/yuicompressor-2.4.2.jar --type js -v #{full_asset_path(s)}")

to avoid problem on Windows OS.

uninitialized class variable @@asset_host in Synthesis::AssetPackage

Hi,

I was just trying out this plug-in as a replacement for the built in logic in v2.3.5 of Rails but I had some issues getting it running.

asset_packager.rb, Line 184: uninitialized class variable @@asset_host in Synthesis::AssetPackage

After doing a search I noticed that this variable was only populated in the build_all method, which is part of a rake task.

As my site was trying to create the initial files on the fly all I did was change the code to the following to get it running:

# class variables
@@asset_host = Rails.configuration.action_controller.asset_host

....

def build_all
   @@asset_packages_yml.keys.each do |asset_type|
      @@asset_packages_yml[asset_type].each { |p| self.new(asset_type, p).build }
    end
end

I didn't have to make a change to the replace_asset_urls method.

EDIT: I just noticed this breaks the rake task, so I have now removed the line I added above and left it in build_all and added it to the replace_asset_urls method.

Regards,
Nick

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.