postcss-asset-url-rails

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i postcss-asset-url-rails

Weekly Downloads

44

Version

1.0.0

License

MIT

Last publish

Collaborators

  • rstacruz