revathskumar / gulp-dart2js

[DON'T USE THIS] Gulp plugin for dart2js
MIT License
7 stars 1 forks source link

Shouldn't be a gulp plugin #2

Open sindresorhus opened 10 years ago

sindresorhus commented 10 years ago

Users should instead just use gulp-spawn or ChildProcess.spawn() directly.

MasseGuillaume commented 10 years ago

@sindresorhus why?

sindresorhus commented 10 years ago

Your plugin should not do something that can be done easily with an existing node module

https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/guidelines.md

revathskumar commented 10 years ago

@sindresorhus noted. This was an experimental one. my first gulp plugin.

natecox commented 10 years ago

Gulp plugins are also supposed to do only one thing. Using a plugin to simply spawn child tasks to do any number of things also breaks the guidelines. This plugin achieves the goal of compiling dart to JavaScript and shouldn't be shot down, otherwise every other plugin to compile a language based on a third party compiler is also wrong.

sindresorhus commented 10 years ago

@natecox it has nothing to do it being spawned, but rather that gulp plugins should only work on the in-memory file contents, not fs paths. This plugins uses file.path, which means any plugins coming before it is moot.

sindresorhus commented 9 years ago

ping