gulp icon indicating copy to clipboard operation
gulp copied to clipboard

Add support for `gulpfile.cjs`

Open david-bojnansky opened this issue 2 years ago • 3 comments

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?

david-bojnansky avatar Nov 27 '21 17:11 david-bojnansky

Can you provide a reproduction that doesn't work?

phated avatar Nov 28 '21 23:11 phated

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

david-bojnansky avatar Nov 29 '21 03:11 david-bojnansky

Bump

WalterWoshid avatar Dec 07 '23 15:12 WalterWoshid