Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate Grunt into Rails asset pipeline [closed]

I would like to exchange / enhance the asset Pipeline with some Grunt tasks. Is there a Way i can integrate grunt into my build process?

like image 885
Daniel Schmidt Avatar asked Nov 16 '13 23:11

Daniel Schmidt


People also ask

How do you Precompile rails assets?

To compile your assets locally, run the assets:precompile task locally on your app. Make sure to use the production environment so that the production version of your assets are generated. A public/assets directory will be created. Inside this directory you'll find a manifest.

What is Require_tree?

The require_tree directive tells Sprockets to recursively include all JavaScript files in the specified directory into the output. These paths must be specified relative to the manifest file.

What is assets Precompile?

rails assets:precompile is the task that does the compilation (concatenation, minification, and preprocessing). When the task is run, Rails first looks at the files in the config.assets.precompile array. By default, this array includes application.js and application.css .

What are assets in rails?

Generally asset is anything that browser loads after it gets the HTML page. Meaning javascript, css and any images. But as you pointed out there are two different image types in a rails project.


1 Answers

You might want to check out the gem half-pipe

And here is a video explaining it

like image 176
strivedi183 Avatar answered Sep 30 '22 10:09

strivedi183