Repository is archived
No commit activity in last 3 years
No release in over 3 years
Let Rails load rev-manifest.json generated by gulp-rev
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 0.34.2

Runtime

 Project Readme

ActionView::RevManifest

Let Rails load rev-manifest.json generated by gulp-rev.

Usage

Add to your Gemfile:

gem "actionview-rev_manifest"

Run:

bundle install

Setup

# config/environments/production.rb

MyApp::Application.config do
  config.rev_manifest.enable = true
end

With Sprockets

If you want to serve some assets with RevManifest and rest of them with Sprockets, specify all sources' name, which you want to serve with RevManifest, as config.rev_manifest.sources:

MyApp::Application.config do
  config.rev_manifest.sources = ["new_application.js", "new_application.css"]
end

Sample gulpfile.coffee

gulp = require "gulp"
rev  = require "gulp-rev"

gulp.task "precompile", ->
  gulp.src([
    "public/assets/javascripts/*.js",
    "public/assets/stylesheets/*.css"
  ], base: "public")
    .pipe(rev())
    .pipe(gulp.dest("public"))
    .pipe(rev.manifest())
    .pipe(gulp.dest("public/assets"))