/rails5-gulp

Blank Rails 5 application with a gulp-based asset pipeline

Primary LanguageRuby

rails5-gulp

A blank Rails 5 application that integrates a gulp-based asset pipeline by including the final assets in Rails' own asset pipeline.

Inspired by https://github.com/vigetlabs/gulp-rails-pipeline.

Development

Run

bundle install

to set everything up on the Rails side of things.

Similarly, run

npm install

to set everything up for the asset pipeline. gulp is used to manage SCSS and JavaScript resources.

To develop the app, you will need two shells running, the first with

bin/rails s

to run the actual Rails app, while the other runs

gulp

to support a BrowserSync session that live reloads whenever a SCSS, JS or Slim template is changed.

Production

Run

npm dist

to compile assets and place them in the public folder. Now run

RAILS_ENV=production bin/rake assets:precompile

to integrate the assets with Rails' own asset pipeline.