-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decamelize tasks created by ES module exports #2270
Decamelize tasks created by ES module exports #2270
Comments
You could specify an alias for your tasks with the task metadata.
So you could use the following: const testLocal = () => Promise.resolve();
testLocal.displayName = 'test-local';
export testLocal; |
I just tried this, it seems that const testLocal = () => Promise.resolve();
testLocal.displayName = 'test-local';
export {testLocal}; With this The following does work (declares const testLocal = () => Promise.resolve();
testLocal.displayName = 'test-local';
gulp.task(testLocal); |
We tried to support If you could get it working correctly, it'd be an awesome addition to the CLI. |
@coreyfarrell any interest in trying to make |
@phated I just did some troubleshooting, determined that If/when the undertaker patch is accepted and released I can submit the fix for export const something1 = gulp.series(a, b);
export const something2 = gulp.series(a, b);
something2.displayName = 'something-2'; With the current undertaker both exports have a displayName property, it's impossible for |
@coreyfarrell thanks for all the work here! I'm planning to release 2.2.0 of gulp-cli once travis/appveyor finish 😄 |
Published! |
That's great, thanks! |
What were you expecting to happen?
ES modules cannot export names with dashes so I was expecting (hoping) camel case exports could be converted to dashed names (so
npx gulp test-local
with sample gulpfile). I know decamelizing would be a breaking change so I can understand if this cannot happen, just figured I'd post in case this would be acceptable for@next
.What actually happened?
All exports become tasks without modification of naming.
Please post a sample of your gulpfile (preferably reduced to just the bit that's not working)
What version of gulp are you using?
gulp@4
What versions of npm and node are you using?
npm: 6.4.1
node: 10.11.0
The text was updated successfully, but these errors were encountered: