vigetlabs / gulp-rails-pipeline

Ditch the Rails Asset Pipeline and roll your own with Gulp
MIT License
646 stars 64 forks source link

browserify using required html #31

Closed julianosaless closed 8 years ago

julianosaless commented 9 years ago

Added a possibility to import html within the browserify

exemple : require('../html/home.html')

Result in file global.js :

module.exports = "<div ng-controller=HomeController><input type=text ng-model=demo><h1 ng-click=clearText()>{{ demo }}</h1></div>";"
julianosaless commented 8 years ago

@greypants any position about my PR ???

greypants commented 8 years ago

Nice! I used to do something similar with the hbsfy transform. That said, the goal of this example was to just provide a base level to build on, making sure that you could still do everything you could with the old rails asset pipeline. I think you're addition is great, but probably doesn't need to be added for everyone.

Also, as soon as I get a chance, I'm going to get this up to date with Gulp Starter 2.0, which now uses Webpack instead of Browserify.

julianosaless commented 8 years ago

@greypants thanks for answering me, webpack it is cool, if you have any project open source using webpack , you can call me :)

greypants commented 8 years ago

@julianosaless https://github.com/vigetlabs/gulp-starter