Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent from grouping by extension #51

Closed
wants to merge 1 commit into from
Closed

Conversation

benweet
Copy link

@benweet benweet commented Aug 30, 2014

This example taken from the README.md didn't work:

gulp.src('./bower.json')
  .pipe(inject(gulp.src(['./dist/app.min.js', './dist/app.min.css'], {read: false}), {
    starttag: '"main": [',
    endtag: ']',
    transform: function (filepath, file, i, length) {
      return '  "' + filepath + '"' + (i + 1 < length ? ',' : '');
    }
  }))
  .pipe(gulp.dest('./'));

It would only inject app.min.css since the injection of the CSS overwrites the injection of the JS.

I've added ignoreExtensions option to make it possible to inject all files regardless of their extension (could be useful in many situations I think).

@joakimbeng
Copy link
Member

Hi, this is actually a regression bug. A new option is not necessary, the code should group files by starttag instead of extension. So I wont merge this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants