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

Open call for plugins #37

Closed
yocontra opened this issue Dec 4, 2013 · 91 comments
Closed

Open call for plugins #37

yocontra opened this issue Dec 4, 2013 · 91 comments
Labels

Comments

@yocontra
Copy link
Member

yocontra commented Dec 4, 2013

Give ideas for plugins. If there is a grunt plugin include the link.

I will try to get to as many as possible. I will also possibly put a bounty on it for somebody else to do it (or you can just do it anyways)

@hparra
Copy link

hparra commented Dec 4, 2013

Someone should port grunt-contrib-connect or provide some lighter alternative.

@yocontra
Copy link
Member Author

yocontra commented Dec 4, 2013

live reload (this kind of needs #32 to be done first)

@hparra
Copy link

hparra commented Dec 4, 2013

@contra Is https://npmjs.org/package/gulp-livereload no good? (IDK, I don't use LiveReload)

@monteslu
Copy link

monteslu commented Dec 4, 2013

r/almond/cram/dojo AMD builders

@yocontra
Copy link
Member Author

yocontra commented Dec 4, 2013

@hparra wow I didn't even see that haha

@monteslu $5 bounty on a r.js builder

@alessioalex
Copy link

Component.js and Browserify gulp builders as well?

@hparra
Copy link

hparra commented Dec 4, 2013

FYI, just release v0.2.0 of generator-gulp-plugin. Should speed plugin development significantly.

@hparra
Copy link

hparra commented Dec 4, 2013

@alessioalex You talking about TJ's component or http://componentjs.com?

@alessioalex
Copy link

@hparra yup, I use it for frontend development. it has the same CommonJS interface as Node (or Browserify).

@chicoxyzzy
Copy link

+1 for gulp-connect and also gulp open

@phated
Copy link
Member

phated commented Dec 4, 2013

gulp-connect doesn't make sense, just use connect.
On Dec 4, 2013 8:37 AM, "Sergey R" notifications@github.com wrote:

+1 for gulp-connect and also gulp open


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-29815019
.

@chicoxyzzy
Copy link

@phated
It makes sense when you need to execute one command to run build, start server, open browser tab and watch + live reload. Or do you mean I just need to start server in my gulpfile script? I didn't try Gulp yet (just found it hour ago) so excuse me if I write something wierd.

@phated
Copy link
Member

phated commented Dec 4, 2013

Gulp uses plain JS, so you can use the regular connect and open modules
inside tasks. It's really awesome. No need for specific plugins for things
like that.
On Dec 4, 2013 9:20 AM, "Sergey R" notifications@github.com wrote:

@phated https://github.com/phated
It makes sense when You need to execute one command to run build, start
server, open browser tab and watch + live reload. Or do you mean I just
need to start server in my gulpfile script? I didn't try Gulp yet (just
found it hour ago) so excuse me if i write something wierd.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-29819449
.

@chicoxyzzy
Copy link

I realized. Yeah sounds great!

@phated
Copy link
Member

phated commented Dec 4, 2013

@contra @monteslu builders don't make sense as gulp plugins

@phated
Copy link
Member

phated commented Dec 4, 2013

@chicoxyzzy I plan to do a gist of something like what you wanted to do sometime today.

@phated
Copy link
Member

phated commented Dec 4, 2013

I think it is important to note on the initial issue that only things that operate on files in a streaming fashion should be built into plugins.

@yocontra
Copy link
Member Author

yocontra commented Dec 4, 2013

@phated I was under the assumption that the r.js builder operated on files

@phated
Copy link
Member

phated commented Dec 4, 2013

The r.js builder operates on files within the context of itself, not in a streaming or globbing manner. If you look into the requirejs plugins for grunt, you will see that they don't use grunt's src or files configuration.

@andrezsanchez
Copy link

A mocha test runner would be great. I'm trying to see if there's an easy way to use it with plain JS, but I have a feeling it might not be.

@yocontra
Copy link
Member Author

yocontra commented Dec 8, 2013

@andrezsanchez child_process.exec('mocha')?

@robrich
Copy link
Contributor

robrich commented Dec 8, 2013

https://github.com/robrich/gulp_node_example/blob/master/gulpLib/lib/gulp-mocha.js is my attempt at it. I could get tests to run, but couldn't easily harvest failure details.

@andrezsanchez
Copy link

@contra I'm relatively new to Node so I don't know exactly how that would work. I tried hacking up a little something using that (and failed thus far). If you know of an example I could look at it would be nice.

@robrich I'll take a look at that, thanks!

Wouldn't either of these solutions not be ideal since they don't operate on streams? I'm probably not going to be compiling my tests suites or anything, but still. Are streams on things like test files not really necessary in this Gulp 'philosophy'?

@yocontra
Copy link
Member Author

yocontra commented Dec 8, 2013

@andrezsanchez Anything that isn't streaming file transformations/actions is done outside of gulp streams (but still within the task system)

If mocha had an interface that let you load one file at a time into it then call .run() it would be a good case for for using the streams.

@douglasduteil
Copy link

I just publish a Karma test runner plugin for Gulp

@yocontra
Copy link
Member Author

yocontra commented Dec 8, 2013

@douglasduteil That doesn't need to be a gulp plugin. Gulp "plugins" are exclusively for streams.

@douglasduteil
Copy link

@contra K my bad. I'm removing the plugin word.

@yocontra
Copy link
Member Author

yocontra commented Dec 8, 2013

@douglasduteil I think we should have a npm tag for gulp friendly libraries that aren't necessarily plugins though. Feel free to add "gulpfriendly" as a tag

yocontra added a commit that referenced this issue Dec 8, 2013
@sindresorhus
Copy link
Contributor

Also need to handle if contents is null: https://github.com/sindresorhus/gulp-size/blob/master/index.js#L12-L14

@floatdrop
Copy link
Contributor

A day late, but gulp-watch is here. Can someone review it?

@marklagendijk
Copy link

@sindresorhus , @contra thanks for the feedback!

@lmartins
Copy link

The major two missing in my workflow are:
gulp-connect
gulp-assemble - Static Site builder

@sindresorhus
Copy link
Contributor

@lmartins connect should just be used directly. assemble shouldn't even be a grunt plugin, but just another node lib, but i guess you can use gulp-grunt to run it.

@lmartins
Copy link

Thank you @sindresorhus, i'll have a look to see if I find any information on how to use connect as you mention. Regarding Assemble, yeah, I've saw gulp-grunt before, I guess it's an option until something "native" come up.

@SilentImp
Copy link

@deepak1556 Hi. May we translate your article “Simple build env for game dev with Gulp under 5 min” into russian language? Under what conditions? Article will be published in Frontender Magazine. It is a free-of-charge and ads-free magazine about frontend development.

@maxov
Copy link

maxov commented Jan 12, 2014

@SilentImp This is probably not the best place to talk about something like that. This issue in particular is about gulp plugins.

@SilentImp
Copy link

@gratimax Sorry, I can't find any other contacts of this guy. :( Only twitter, but it look like he don't use it.

@jonschlinkert
Copy link

assemble shouldn't even be a grunt plugin, but just another node lib

@sindresorhus why?

@phated
Copy link
Member

phated commented Jan 13, 2014

@jonschlinkert because it doesn't operate on globs of files. Any build tool that doesn't operate on globs and already has a programmatic API can and should be used in gulp standalone. Gulp is just JS, there is no need to duplicate code when something already exists.

@jonschlinkert
Copy link

@phated, the referenced part of @sindresorhus's comment was about grunt, not gulp.

@phated
Copy link
Member

phated commented Jan 13, 2014

@jonschlinkert sorry, I didn't fully read, but why are you trying to battle about grunt plugins on a gulp issue. Please do that somewhere else. @sindresorhus is always in IRC

@yocontra
Copy link
Member Author

@sindresorhus probably meant gulp

@sindresorhus
Copy link
Contributor

No I didn't mean gulp. My point is that it shouldn't even be a grunt plugin. Definitely not a gulp plugin. It should just be a vanilla node lib that is consumed by a simple grunt plugin and can be directly used in a gulpfile. Creating large plugins is such a bad pattern, but still very popular in the grunt ecosystem. Plugins should just be a tiny glue.

@phated
Copy link
Member

phated commented Jan 13, 2014

And only glue when necessary.
On Jan 13, 2014 1:42 AM, "Sindre Sorhus" notifications@github.com wrote:

No I didn't mean gulp. My point is that it shouldn't even be a grunt
plugin. Definitely not a gulp plugin. It should just be a vanilla node lib
that is consumed by a simple grunt plugin and can be directly used in a
gulpfile. Creating large plugins is such a bad pattern, but still very
popular in the grunt ecosystem. Plugins should just be a tiny glue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-32152177
.

@lmartins
Copy link

Im going to suggest perhaps this isn't the best discussions format for new Gulp plugins. Would be nice to have a way to isolate discussions about each plugin, and perhaps even a voting system.

@yocontra
Copy link
Member Author

Plugin idea: gulp-flatten that just does file.base = path.dirname(file.path);

https://gist.github.com/joeLepper/8393135

Also taking a PR to add a recipe for using this to the docs

@jonschlinkert
Copy link

@sindresorhus

My point is that it shouldn't even be a grunt plugin. Definitely not a gulp plugin. It should just be a vanilla node lib that is consumed by a simple grunt plugin and can be directly used in a gulpfile.

Indeed, it started as grunt-assemble, a simple plugin to wrap layouts around pages with hogan.js, but based on the success of the project it was announced some time ago that Assemble would be a standalone node lib in v0.5.0 (this month). I'm thankful that we have a community now and that we have this challenge to deal with.

Creating large plugins is such a bad pattern, but still very popular in the grunt ecosystem.

I think that's a good view in general, with both Assemble and grunt-usemin (your project) begin great examples. An equally bad pattern is trying to broadly generalize the best approach or pattern to use for every project. At the end of the day "what's best" comes down to being pragmatic about the specific needs of a project, time, resources, etc. To most users, it's not the size of the plugin that matters, just that it solves their problems.

@phated

why are you trying to battle about grunt plugins on a gulp issue. Please do that somewhere else

To be crystal clear, I'm 100% neutral. I'm well aware of your own views on Grunt, but I want no part of your conflict, so don't try to project it on me. I started using gulp recently on projects and I've even published a few (very amateurish) gulp plugins in my effort to learn more about how gulp/streams work. Assemble is also neutral, and we're aiming to work with whatever ecosystem our community requests. So I stopped by here to learn about gulp today and noticed others discussing my project. Note that I asked a question in response to pre-existing conversation about my project. I didn't bring up Grunt, @sindresorhus did, and nonetheless I'm glad to hear his response - he's a super-smart guy and I use his projects every day, and we're in agreement. So let's leave it at that.

@yocontra
Copy link
Member Author

@jonschlinkert cool - looking forward to a standalone node lib

@jonschlinkert
Copy link

👍

@passy
Copy link

passy commented Jan 13, 2014

It should just be a vanilla node lib that is consumed by a simple grunt plugin and can be directly used in a gulpfile. Creating large plugins is such a bad pattern

👍

@hemanth
Copy link

hemanth commented Jan 13, 2014

Unix philosophy FTW! 👍

@rkusa
Copy link

rkusa commented Jan 16, 2014

Idea: Gulp plugin for creating CSS sprites

Similar grunt plugins are:

@steffenmllr
Copy link

I was thinking about that yesterday and asked myself what is the best way to handle the 2 output streams: sprite images and css ?

Thought about using https://github.com/Ensighten/spritesmith and https://github.com/twolfson/json2css with some gulp glue code

@callumacrae
Copy link
Member

Should my plugin actually be a plugin? https://github.com/callumacrae/gulp-w3cjs

It doesn't really use the stream, it just takes the file names and gives them to the w3cjs plugin. I do have PR open with w3cjs to change that, though.

@yocontra
Copy link
Member Author

@callumacrae As a placeholder you should be fine. Once they merge in your PR it will be good and you can follow the same pattern as jshint, csslint, etc. in terms of reporters/failure

@callumacrae
Copy link
Member

Done that.

I'm guessing a Gulp task for CasperJS (similar to grunt-casperjs) would be unsuitable? It accepts file name input, not file contents.

@phated
Copy link
Member

phated commented Jan 26, 2014

@callumacrae correct, you would want to use a globber and pass them off to casper calls. It wouldn't really make use of or transform the vinyl objects, so it doesn't belong as a plugin.

@backflip
Copy link

backflip commented Feb 1, 2014

«Using https://github.com/Ensighten/spritesmith and https://github.com/twolfson/json2css with some gulp glue code» sounds great!

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

No branches or pull requests