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

Improve gulp plugin adapters (many plugins don't work, many aren't supported). #16

Open
unlight opened this issue Oct 19, 2015 · 9 comments

Comments

@unlight
Copy link

unlight commented Oct 19, 2015

gulp-eslint do empty output.
Check example: https://www.npmjs.com/package/gulp-eslint
In gulp I must use eslint.format(), but how to inject it to sigh file?

var eslint; // wrapped
var gEslint = require('gulp-eslint');

module.exports = function(pipelines) {
  pipelines['lint'] = [
    glob('src/*.js'),
    eslint(),
   // gEslint.format() // does not work
  ];
}

Some plugins cannot be injected because without gulp- prefix they are reserved words:
gulp-if, gulp-switch, etc.

@insidewhy
Copy link
Contributor

Good point, I will add gulpPluginName as an alternative, or maybe gulp.pluginName. Currently gulp plugins that export stream manipulators as subfields aren't supported but adding such support shouldn't be that difficult, you can raise a github issue for it if you want?

@unlight
Copy link
Author

unlight commented Nov 27, 2015

Some more info about gulp-plugins.

Some plugins are not following gulp-plugin name conventions.
http://npmsearch.com/?q=keywords:gulpfriendly
So it is not possible to inject it.

I made some research, and some gulp-plugins does not work.
Some of them fails silently (does not output pipeline x complete: 0.023 seconds)

List of gulp plugins that works:
  • gulp-debug
  • gulp-ng-annotate
  • gulp-bump
  • gulp-notify
  • gulp-benchmark
  • gulp-less (extension stays as less)
List of gulp plugins that does not work:
  • gulp-rename
  • gulp-duration
  • gulp-size
  • gulp-eslint (sigh cannot adapt exported properties from module)
  • gulp-browatchify (fails silently)

@insidewhy
Copy link
Contributor

Thanks for the information.

  • gulp-browatchify: most of my integration work with sigh will be aimed at jspm rather than browserify as I strongly believe jspm is the future.
  • gulp-rename: this adapts the streamed value to a differing path value, this wouldn't be compatible with sigh's adapter. It could be made to work though with a new feature to the gulp adapter code.

@unlight
Copy link
Author

unlight commented Dec 2, 2015

most of my integration work with sigh will be aimed at jspm rather than browserify
as I strongly believe jspm is the future.

That's sad. Browserify has a lot of useful plugins.

@unlight
Copy link
Author

unlight commented Dec 24, 2015

gulp-typescript doesnt work.

@jmatsushita
Copy link

gulp-rename: this adapts the streamed value to a differing path value, this wouldn't be compatible with sigh's adapter. It could be made to work though with a new feature to the gulp adapter code.

Could you elaborate on this? Also would renaming be supported by the built-in plugins or would that need to be done in a new plugin (I'll probably give that a shot to learn more)?

@insidewhy
Copy link
Contributor

Ah it's because the way that gulp determines which output event relates to which input event is by checking the filenames... if a filename changes then it fails. However gulp allows you to attach your own metadata to each event (which well behaving plugins are supposed to pass through) which could be used instead. Should be a very simple fix, if you open a bug for it I can tackle it as soon as I'm back from holiday.

@insidewhy
Copy link
Contributor

s/gulp determines/sigh determines/

@insidewhy
Copy link
Contributor

Hm that's not it, not sure why it isn't working.

@insidewhy insidewhy changed the title Gulp plugins issues Improve gulp plugin adapters (many plugins don't work, many aren't supported). Apr 12, 2016
@insidewhy insidewhy added ready and removed ready labels Apr 17, 2016
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

No branches or pull requests

3 participants