GithubHelp home page GithubHelp logo

Comments (1)

greypants avatar greypants commented on June 11, 2024

Hola. To clarify, this isn't a gem - it's just an example of how to go about setting up a Gulp based asset pipeline. At the moment, you'd have to copy everything over to your own project manually.

Source maps are already set up and working with both sass and js/coffee. Let me know if that's not the case.

The .js.erb stuff was Rails Asset Pipeline specific. You could still use the Rails Asset Pipeline if you need Ruby to transform your files first. Just put those files in app/assets and //require= them like you always have. Alternatively, if there's some data your JS needs from your app, you could always throw it inline in your view on a data-attribute, or in a script tag.

As far as ejs goes, you can use whatever JavaScript templating language you want. There are browserify transforms for all of them. Here's one for ejs: https://github.com/hughsk/ejsify

These transforms let you require templates as if they were js files. See https://github.com/greypants/gulp-starter/blob/master/src/javascript/view.coffee#L8 and https://github.com/greypants/gulp-starter/blob/master/src/javascript/template.hbs for an example using handlebars and hbsify.

Hope that helps!

from gulp-rails-pipeline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.