0.0
No commit activity in last 3 years
No release in over 3 years
really adds `require_glob` and `stub_glob` directives to Sprockets
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.10
~> 10.0
 Project Readme

Sprockets::Glob

Gem Version

adds require_glob and stub_glob directives to sprockets

These were already in an example in the Sprockets repo, but we've used them enough to package them into a gem.

Installation

gem 'sprockets-glob'

Usage

First you need to register the Sprockets::Glob::DirectiveProcessor with the correct MIME types. Then you can use it in your normal Sprockets pipeline. Here's an example using javascript:

# config/initializers/sprockets.rb
require 'sprockets/glob'
Rails.application.assets.register_processor('application/javascript', Sprockets::Glob::DirectiveProcessor)

# application.js
//= require_glob features/**/*.js
//= stub_glob features/**/*test.js