npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

postcss-asset-url-rails

1.0.0

@rstacruz

npmHomeRepoSnykSocket
Downloads:1212
$ npm install postcss-asset-url-rails
DailyWeeklyMonthlyYearly

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