GithubHelp home page GithubHelp logo

Comments (13)

schoenwaldnils avatar schoenwaldnils commented on May 28, 2024 3

@LNSD I tried using it again, and the way you describe it, it works.
I just wonder why export default function doesn't work. If I want to write ES6, I want to use it all the way ^^

from gulp-require-tasks.

LNSD avatar LNSD commented on May 28, 2024 1

Yes, they use ES6 syntax (for example I'm using import in stead of require()). The task files are not named whatever.babel.js. And it's working.

I've tried to use the export default function (gulp) {...}, but it doesn't work; so I kept the ES5 modules.export = function (gulp) {...}. I think is related to the way that this module import/requires tasks.

I hope I've helped.

from gulp-require-tasks.

slavafomin avatar slavafomin commented on May 28, 2024

Hello!

I'm not familiar with this file format, could you elaborate please?

If the file conforms to the documented format it should work fine, however, if you need it to work with some other format, you should create a feature request with comprehensive description of required functionality. Then we will be able to discuss it further.

Cheers!

from gulp-require-tasks.

schoenwaldnils avatar schoenwaldnils commented on May 28, 2024

Hi,

this is for using ES2015 in your gulpfile.
A better explenation here: https://markgoodyear.com/2015/06/using-es6-with-gulp/

from gulp-require-tasks.

slavafomin avatar slavafomin commented on May 28, 2024

Well, I see.

I will look into it on first occasion. ES2015 is definitely the future, so I will make it a priority.

from gulp-require-tasks.

schoenwaldnils avatar schoenwaldnils commented on May 28, 2024

Hi there, are there any updates on this enhancement?
I'm working a lot with gulp lately, and my gulpfile is way to big :D

from gulp-require-tasks.

LNSD avatar LNSD commented on May 28, 2024

@schoenwaldnils I'm not sure what .babel.js files are talking about, but I'm using a babel gulpfile (gulpfile.babel.js) and this module is working well. 👍

from gulp-require-tasks.

schoenwaldnils avatar schoenwaldnils commented on May 28, 2024

@LNSD are your required files for different tasks also written in ES6? I think that was my problem.

from gulp-require-tasks.

markotom avatar markotom commented on May 28, 2024

@LNSD @schoenwaldnils

This library uses node-require-directory to load tasks files. I recently sent this pull request troygoode/node-require-directory#31 to add support to ES6 exports.

I hope this helps eventually with this library!

from gulp-require-tasks.

slavafomin avatar slavafomin commented on May 28, 2024

Thank you for pinpointing the problem @markotom, I've commented on your PR. I will be glad if it will be accepted, it will make default exports possible with this module as well.

from gulp-require-tasks.

kapooostin avatar kapooostin commented on May 28, 2024

You should export const fn = (gulp, callback)... for a main task and export const deps = [] for dependent tasks.

from gulp-require-tasks.

schoenwaldnils avatar schoenwaldnils commented on May 28, 2024

@kapooostin are you sure you're in the correct issue? export does not work at all (since I tested it the last time)

from gulp-require-tasks.

kapooostin avatar kapooostin commented on May 28, 2024

Yep, I'm using it right now. It works because we have this https://github.com/betsol/gulp-require-tasks#module-as-an-object

from gulp-require-tasks.

Related Issues (18)

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.