1.0.0 • Published 9 years ago

postcss-asset-url-rails v1.0.0

Weekly downloads
38
License
MIT
Repository
github
Last release
9 years ago

postcss-asset-url-rails

Transform Rails asset helpers to ERB syntax using postcss

postcss-asset-url-rails converts Rails's asset pipeline helpers into Rails's ERB syntax. This allows you to build CSS files using postcss outside Rails, output them as .css.erb for use in the Rails asset pipeline. It takes asset-url(...) values and turns them into url(<%= asset_path(...) %>).

/* Input:  */  div { background: asset-url("hello.jpg") }
/* Output: */  div { background: url(<%= asset_path("hello.jpg") %>) }

Also see

npm-pipeline-rails allows you to use npm tools to build files for your asset pipeline.

Thanks

postcss-asset-url-rails © 2016+, Rico Sta. Cruz. Released under the MIT License. Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz