Comments (13)
@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.
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.
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.
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.
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.
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.
@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.
@LNSD are your required files for different tasks also written in ES6? I think that was my problem.
from gulp-require-tasks.
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.
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.
You should export const fn = (gulp, callback)...
for a main task and export const deps = []
for dependent tasks.
from gulp-require-tasks.
@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.
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)
- Question: Alternative syntax for dependencies HOT 2
- Pass variables to tasks HOT 1
- Possible to retrieve values from dependencies? HOT 2
- Register tasks with the name of directories HOT 1
- Unexpected token ... HOT 4
- Add dependencies to package.json HOT 1
- arguments is an empty object in on.('finish') callback HOT 3
- Multiple tasks in a single file? HOT 2
- Load tasks from multiple directories HOT 3
- Sub-task triggers parent task HOT 2
- The path option documentation is not clear HOT 1
- Pass options to white/blacklist files in tasks directory HOT 1
- How to use nativeTask, provide example please. HOT 5
- Share configuration variables across all task files HOT 1
- Provide support for modules that change Gulp's API HOT 5
- __dirname + '/tasks' is not default value of path parameter HOT 2
- Synchronous tasks without callback don't finish HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-require-tasks.