gulp-rails-pipeline icon indicating copy to clipboard operation
gulp-rails-pipeline copied to clipboard

Drop-in solution

Open LimeBlast opened this issue 9 years ago • 7 comments

I'm wondering if it's realistic to have a branch/repo of this project which contains just the files needed to make it work - or maybe a rails generator or something?

I've got an existing app which I want to use this on, but currently have to go though and manually make all of the changes - so was wondering if there was an easier way to do so.

Thanks :)

LimeBlast avatar Mar 22 '15 14:03 LimeBlast

:+1: for a yeoman generator

rymohr avatar Apr 14 '15 22:04 rymohr

+1 Same here, trying to migrate an existing Rails App from Rails Asset Pipeline to gulp. Would love to have a generator to simplify the migration.

@LimeBlast Did you manage to migrate manually? Do you have any hints on important changes which need to be done besides those listed in https://github.com/vigetlabs/gulp-rails-pipeline#rails-setup-notes?

jekuno avatar Jun 11 '15 17:06 jekuno

Hi @jekuno, I did manage to get it working, but I've not done much with the project on which I did it, and it was a while ago. I don't recall anything other than what the notes suggest, but I did find some minor problems with the sample repo, but I submitted a pull request which has already been merged in.

LimeBlast avatar Jun 12 '15 08:06 LimeBlast

Hi @LimeBlast - ok thanks a lot. I'll try my best to get it set up manually :)

jekuno avatar Jun 12 '15 08:06 jekuno

I've been working on a drop-in solution here: https://github.com/alienfast/gulp-pipeline

I need to reuse a basic pipeline in multiple node-based projects, as well as a rails app that uses rails engines.

It draws much inspiration from this project so many thanks to the vigetlabs team and contributors (including the blog post that got this started).

I would love to collaborate further with this group, I think my approach solves the reuse/extensibility issue.

Thanks again and everyone is welcome.

rosskevin avatar Feb 03 '16 18:02 rosskevin

I too have been working on a drop-in solution based on the work in this project. I wanted something I could throw into existing Rails projects and get gulp up and running with just a few commands.

https://github.com/madriska/gulp-rails

Right now my implementation takes care of all the Rails specific configuration and gets the basic gulp scripts moved into the right places. It also sets up react-rails and server rendering with full gulp support.

Currently the documentation is sparse but I hope to improve that over time.

Thoughts? Comments? Concerns? I'd love to hear them. Thanks to everyone who's worked on this project. I know I wouldn't have been able to do what I did without ya'll 😄

jordanbyron avatar Apr 28 '16 20:04 jordanbyron

gulp-pipeline-rails is new but we seem to have it working so far. It is a drop-in replacement for sprockets and uses gulp-pipeline with a RailsRegistry for really simple configuration. i.e. here is your complete gulpfile.babel.js:

import {RailsRegistry} from 'gulp-pipeline'
import gulp from 'gulp'

// minimal setup with no overrides config
gulp.registry(new RailsRegistry())

This creates all the tasks you need, view them with gulp --tasks. Notable tasks:

  • gulp runs the default task which builds all assets for development
  • For development, you my want to
    • run individual watches for speed such as gulp css:watch js:watch images:watch
    • use the all-in-one gulp default:watch will watch all asset sources and run default
  • gulp all runs default then digest which is a full clean build with revisioned assets for production

rosskevin avatar May 03 '16 15:05 rosskevin