wiledal / gulp-include

Enables functionality similar to that of snockets / sprockets or other file insertion compilation tools.
158 stars 68 forks source link

Includes does not keep tabs #8

Closed juanghurtado closed 10 years ago

juanghurtado commented 10 years ago

When including files, it should be useful to retain tab. Let me explain with an example:

describe "Unit tests", ->
  #= include "test1.coffee"
describe "Test 1", ->
  it "Awesome test", ->
    "foo".should.not.equal "bar"

The resulting file after the includes should be:

describe "Unit tests", ->
  describe "Test 1", ->
    it "Awesome test", ->
      "foo".should.not.equal "bar"

I don't know if this is possible, but would be a nice feature to have. At least for Coffeescript files, which takes into account the nesting.

maxgalbu commented 10 years ago

+1

This pull request seems to solve it, but it wasn't merged: https://github.com/wiledal/gulp-include/pull/18