Giter Club home page Giter Club logo

Comments (7)

yocontra avatar yocontra commented on May 29, 2024

Can you provide a clearer example? Not sure what you're asking

from gulp.

nwmcsween avatar nwmcsween commented on May 29, 2024

I want to fork on a event and process files within that fork thus for the above, given:

src/{a,b}/{foo,bar}.coffee

would produce:

src/{a,b}.js

from gulp.

yocontra avatar yocontra commented on May 29, 2024

Why not just use two streams? I'm not sure I see the use case or that it's common enough to add what seems like a hefty feature

from gulp.

nwmcsween avatar nwmcsween commented on May 29, 2024

can you show me an example? do you mean two tasks? because I would need a task per directory and per every other directory with a *.coffee file within it which would quickly become painful

from gulp.

yocontra avatar yocontra commented on May 29, 2024

For the example in your last post:

gulp.task('coffee', function() {
  var dirs = ['a','b'];
  dirs.forEach(function(d){
    gulp.src('./src/'+d+'/**.coffee')
       .pipe(coffee())
       .pipe(jshint())
       .pipe(concat(d+'.js'))
       .pipe(gulp.dest('./static'));
  });
});

from gulp.

nwmcsween avatar nwmcsween commented on May 29, 2024

the coffee files would be spread over many dir's but I guess I could read the dirs at runtime, I never thought of that, thanks.

from gulp.

yocontra avatar yocontra commented on May 29, 2024

Gulp tries to find a good point between sugar and simplicity. Features like this we will usually do it as code and not include it in the core library. If you find yourself doing something tedious over and over feel free to write a userland module that simplifies it and tag it as a gulp plugin!

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.