gulp
gulp copied to clipboard
Add support for `gulpfile.cjs`
Describe your idea for a new feature
Add support for gulpfile.cjs
Explain the problem your idea is trying to solve
In package.json
I have type
set to module
but I would like to have gulpfile
in CommonJS format (.cjs
) with require()
s. Seems like not possible now.
How will it benefit gulp and its users?
They could code Gulp tasks in CommonJS format without to worry about module type.
If this feature could exist outside of gulp (like as a plugin or a module), would you be interested in helping to create and maintain it?
Can you provide a reproduction that doesn't work?
@phated Sorry, I just didn'ť mentioned that it is about filename. If I create gulpfile.cjs
it isn't taken into account as gulpfile.js
is. Of course, if I specify it explicitly like npx gulp -f gulpfile.cjs sample
it works.
Yeah, if I look what I typed it seems like it does not work in CJS format at all what is not true. This issue had to be about supporting gulpfile.cjs
same as gulpfile.js
which excludes for example specifying file with -f
option.
Bump