A Rails 5 application that integrates a gulp-based asset pipeline by including the final assets in Rails' own asset pipeline.
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
or, alternatively
npm run dev
to support a BrowserSync session that live reloads whenever a SCSS, JS or Slim template is changed.
Run
npm run 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.