Giter Club home page Giter Club logo

Comments (91)

hparra avatar hparra commented on May 30, 2024

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

from gulp.

yocontra avatar yocontra commented on May 30, 2024

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

from gulp.

hparra avatar hparra commented on May 30, 2024

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

from gulp.

monteslu avatar monteslu commented on May 30, 2024

r/almond/cram/dojo AMD builders

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@hparra wow I didn't even see that haha

@monteslu $5 bounty on a r.js builder

from gulp.

alessioalex avatar alessioalex commented on May 30, 2024

Component.js and Browserify gulp builders as well?

from gulp.

hparra avatar hparra commented on May 30, 2024

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

from gulp.

hparra avatar hparra commented on May 30, 2024

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

from gulp.

alessioalex avatar alessioalex commented on May 30, 2024

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

from gulp.

chicoxyzzy avatar chicoxyzzy commented on May 30, 2024

+1 for gulp-connect and also gulp open

from gulp.

phated avatar phated commented on May 30, 2024

gulp-connect doesn't make sense, just use connect.
On Dec 4, 2013 8:37 AM, "Sergey R" [email protected] 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
.

from gulp.

chicoxyzzy avatar chicoxyzzy commented on May 30, 2024

@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.

from gulp.

phated avatar phated commented on May 30, 2024

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" [email protected] 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
.

from gulp.

chicoxyzzy avatar chicoxyzzy commented on May 30, 2024

I realized. Yeah sounds great!

from gulp.

phated avatar phated commented on May 30, 2024

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

from gulp.

phated avatar phated commented on May 30, 2024

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

from gulp.

phated avatar phated commented on May 30, 2024

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.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

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

from gulp.

phated avatar phated commented on May 30, 2024

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.

from gulp.

andrezsanchez avatar andrezsanchez commented on May 30, 2024

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.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@andrezsanchez child_process.exec('mocha')?

from gulp.

robrich avatar robrich commented on May 30, 2024

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.

from gulp.

andrezsanchez avatar andrezsanchez commented on May 30, 2024

@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'?

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@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.

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

I just publish a Karma test runner plugin for Gulp

from gulp.

yocontra avatar yocontra commented on May 30, 2024

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

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

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

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@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

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

@contra ๐Ÿ‘

from gulp.

phated avatar phated commented on May 30, 2024

I think these shouldn't be prefixed with gulp-, thoughts?

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@phated If somebody specifically made something to make it easier for gulp users I think that it is okay to prefix it with gulp. Name conflicts are going to happen and there isn't much we can do about it

from gulp.

phated avatar phated commented on May 30, 2024

I guess my point is that it has nothing to do with gulp. It uses the done callback, which could be used by anything else. Trying to shoehorn agnostic modules into gulp specificity seems mistaken with the best intentions.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@phated I think the karma runner is a bad example since the API is the same as if you just required karma directly. Still, we can't block people from naming their module whatever they want. Once I have the plugin listing page up and running we can blacklist non-conforming packages there. That's why I added this to the plugin guidelines:

"If you don't follow these guidelines and somebody notices your plugin will be shitlisted from the ecosystem."

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

@phated That's so true it's just a wrapper of the existing karma stuff.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@douglasduteil Do you provide any features over the existing karma stuff that make it easier to use with gulp? If not, it probably shouldn't be labeled as gulpfriendly or be prefixed with gulp-

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

Yes and No. It's just two shortcuts to use launch and run karma tests.
I would say No 'cause there is nothing more than what you can already do with the existing karma stuff.
On the other hand I would say Yes 'cause I wrapped it to make it handy to use.

from gulp.

phated avatar phated commented on May 30, 2024

@douglasduteil's code looks like it could be useful in many scenarios outside of gulp. It looks to be a nice standalone wrapper, which is why I was suggesting it lose the gulp prefix. I still like the idea of keeping the gulpfriendly keyword

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@phated Agreed

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

@phated @contra Alright...
So I might just call it a node karma wrapper

from gulp.

robrich avatar robrich commented on May 30, 2024

@contra I agree we should have a tag for things that facilitate gulp workflows but aren't plugins, but 'gulpfriendly' doesn't feel quite right. Maybe just 'gulp'? Alas, it may be water under the bridge by now.

from gulp.

phated avatar phated commented on May 30, 2024

gulp compatible

from gulp.

robrich avatar robrich commented on May 30, 2024

This thread may need to be refactored as it's currently hosting a few topics:

  • how to tag non-plugins that facilitate gulp
  • gulp tasks vs. gulp plugins (now #39)
  • a karma wrapper
  • a mocha wrapper
  • generator-gulp-plugin
  • renaming file extensions and gulp-rename
  • bounties for cool plugins
  • plugin ideas

from gulp.

douglasduteil avatar douglasduteil commented on May 30, 2024

Just made another gulp friendly wrapper : conventional-changelog-wrapper
It's a fork of the grunt-conventional-changelog.
It generates a changelog like those one :

I principally drop the promise part of in favor of streams so you can pipe it like :

changelogWrapper.generate().pipe(process.stdout);

Did I name it right this time ?

from gulp.

Integralist avatar Integralist commented on May 30, 2024

Just so I've documented it somewhere, I've looked at https://npmjs.org/search?q=gulpplugin and it looks like the following plugins BBC News uses are yet to be implemented...

grunt-contrib-watch
grunt-contrib-requirejs
grunt-contrib-imagemin
grunt-contrib-connect
grunt-contrib-jasmine
grunt-mocha-test
grunt-plato

...other plugins we use (such as sass, and uglify etc) are already implemented.

from gulp.

hparra avatar hparra commented on May 30, 2024

Watch is built in.

from gulp.

Integralist avatar Integralist commented on May 30, 2024

@hparra ah, fine :-) sorry I've not looked at Gulp at all yet other than cursory information about it which has popped up in my social streams. But I'm keen to explore it further.

from gulp.

thanpolas avatar thanpolas commented on May 30, 2024

I'll port all my grunt-plugins to gulp in time (assetflow, closure-tools and a couple others)...

Would it be possible to find you at freenode for climbing the gulp learning curve? #gulp maybe?

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@thanpolas #wearefractal and #gulpjs on freenode

from gulp.

maxov avatar maxov commented on May 30, 2024

@andrezsanchez I was able to get mocha tests working pretty nicely like this:

gulp.task('test', function(cb) {
    spawn('cmd', ['/c', 'node_modules\\.bin\\mocha.cmd', '-R', 'spec'], {stdio: 'inherit'})
        .on('close', function() {
            cb();
        });
});

I inherit standard out so the output(failure or otherwise) shows in the console. Works well enough for me.
Note that this version works only on windows(because I'm stuck with windows). I think a mac-friendly version would look like:

gulp.task('test', function(cb) {
    spawn('node_modules/.bin/mocha', ['-R', 'spec'], {stdio: 'inherit'})
        .on('close', function() {
            cb();
        });
});

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@gratimax Awesome - that is exactly what I mean when I say things can be done outside of gulp (file streaming). If somebody broke that out into it's own module it would be considered gulpfriendly

from gulp.

andrezsanchez avatar andrezsanchez commented on May 30, 2024

@gratimax Great! It seems to be working fine on Windows here too.

Just doing

spawn(path.join(__dirname, 'node_modules/.bin/mocha.cmd'), ...)

worked for windows too.

It would be great if this were its own module and ran cross-platform so it could be used wherever. I don't know how to go about doing that, but I would be willing to if someone pointed me in the right direction.

I am writing a web-app on my internship I just started. I chose to use gulp rather than Grunt, and I am really enjoying it so far. I really appreciate the work and thought that you guys are putting into this, so I would like to contribute any way I can.

from gulp.

maxov avatar maxov commented on May 30, 2024

I'll probably be writing a quick plugin for mocha integration, because mocha does take files and can output stuff, so it would work pretty nicely as a plugin.

from gulp.

deepak1556 avatar deepak1556 commented on May 30, 2024

@alessioalex i just wrote this quick plugin for my ld-28 setup https://github.com/deepak1556/gulp-browserify. also i just made a blog post on it http://robo.ghost.io/getting-started-with-gulp-2/

from gulp.

Integralist avatar Integralist commented on May 30, 2024

@deepak1556 thanks for the post link, I've bookmarked that for my xmas reading session :-)

from gulp.

steffenmllr avatar steffenmllr commented on May 30, 2024

I'll just throw that in here https://github.com/mllrsohn/gulp-protractor - more a wrapper than a real plugin but it does it's job :)

from gulp.

yocontra avatar yocontra commented on May 30, 2024

I think we got all of the big ones. Good work guys! We are now at 100 plugins!

from gulp.

marklagendijk avatar marklagendijk commented on May 30, 2024

I just finished my first gulp plugin. The plugin converts HTML files of an AngularJS app into Javascript code which puts that HTML file into the Angulars' $templateCache.
I believe I followed all best practices and quality standards, but could someone please review my work?

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@marklagendijk Looks great! Follows all of the guidelines.

from gulp.

sindresorhus avatar sindresorhus commented on May 30, 2024

@marklagendijk use map-stream directly instead of event-stream and use the gulp-util method for changing file extension: https://github.com/marklagendijk/gulp-ng-html2js/blob/master/index.js#L40

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@sindresorhus Ah I didn't notice that one - I checked it out on my phone. Good catch

from gulp.

kenany avatar kenany commented on May 30, 2024

use map-stream directly instead of event-stream

๐Ÿ˜Š

from gulp.

sindresorhus avatar sindresorhus commented on May 30, 2024

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

from gulp.

floatdrop avatar floatdrop commented on May 30, 2024

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

from gulp.

marklagendijk avatar marklagendijk commented on May 30, 2024

@sindresorhus , @contra thanks for the feedback!

from gulp.

lmartins avatar lmartins commented on May 30, 2024

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

from gulp.

sindresorhus avatar sindresorhus commented on May 30, 2024

@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.

from gulp.

lmartins avatar lmartins commented on May 30, 2024

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.

from gulp.

SilentImp avatar SilentImp commented on May 30, 2024

@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.

from gulp.

maxov avatar maxov commented on May 30, 2024

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

from gulp.

SilentImp avatar SilentImp commented on May 30, 2024

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

from gulp.

jonschlinkert avatar jonschlinkert commented on May 30, 2024

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

@sindresorhus why?

from gulp.

phated avatar phated commented on May 30, 2024

@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.

from gulp.

jonschlinkert avatar jonschlinkert commented on May 30, 2024

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

from gulp.

phated avatar phated commented on May 30, 2024

@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

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@sindresorhus probably meant gulp

from gulp.

sindresorhus avatar sindresorhus commented on May 30, 2024

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.

from gulp.

phated avatar phated commented on May 30, 2024

And only glue when necessary.
On Jan 13, 2014 1:42 AM, "Sindre Sorhus" [email protected] 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
.

from gulp.

lmartins avatar lmartins commented on May 30, 2024

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.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

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

from gulp.

jonschlinkert avatar jonschlinkert commented on May 30, 2024

@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.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@jonschlinkert cool - looking forward to a standalone node lib

from gulp.

jonschlinkert avatar jonschlinkert commented on May 30, 2024

๐Ÿ‘

from gulp.

passy avatar passy commented on May 30, 2024

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

๐Ÿ‘

from gulp.

hemanth avatar hemanth commented on May 30, 2024

Unix philosophy FTW! ๐Ÿ‘

from gulp.

rkusa avatar rkusa commented on May 30, 2024

Idea: Gulp plugin for creating CSS sprites

Similar grunt plugins are:

from gulp.

steffenmllr avatar steffenmllr commented on May 30, 2024

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

from gulp.

callumacrae avatar callumacrae commented on May 30, 2024

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.

from gulp.

yocontra avatar yocontra commented on May 30, 2024

@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

from gulp.

callumacrae avatar callumacrae commented on May 30, 2024

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.

from gulp.

phated avatar phated commented on May 30, 2024

@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.

from gulp.

backflip avatar backflip commented on May 30, 2024

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

from gulp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.