-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
fix: use wildcard values as names #165
fix: use wildcard values as names #165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR -- there are a few small things to fix though!
command: `npm run ${script}${args}`, | ||
name: script | ||
name: (commandInfo.names || '') + script.match(wildcardRegex)[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right property is name
{ name: 'w:foo', command: 'npm run watch-foo' }, | ||
{ name: 'w:bar', command: 'npm run watch-bar' }, | ||
]); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing semicolon
} | ||
}); | ||
|
||
expect(parser.parse({ names: 'w:', command: 'npm run watch-*' })).toEqual([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will have to fix the property here too to name
(see above)
My bad, should be all fixed now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, it looks good.
Now I'm unsure about it, though. #148 doesn't state what the problem actually is.
What you are doing here is reverting the prefixing strategy back to what v3 had -- I'm not sure which style is the preferred one by the users, and might even be a breaking change.
@@ -28,7 +28,7 @@ module.exports = class ExpandNpmWildcard { | |||
.filter(script => wildcardRegex.test(script)) | |||
.map(script => Object.assign({}, commandInfo, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rolled this line back to what it is on master
, as some other information will exist on commandInfo
Closing as it's fixed by #211. |
fix #148