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
feat: generate different scripts for different projects if they are a part of the same workspace #165
Conversation
… part of the same workspace
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.
Looks good, a couple small comments
src/schematics/ng-add/add-scripts.ts
Outdated
|
||
// Sorts all numbers for ascending order. For example we will get | ||
// `[4200, 4201, 4202]` sorted numbers. We will need `4202` to get next port. | ||
return ports.sort((a, b) => a - b); |
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 sort function here is unnecessary, right? Each port is already a number due to line 105, so default sort will work?
return ports.sort((a, b) => a - b); | |
return ports.sort(); |
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.
Honestly saying haven't used sort
in practice, just googled for sort ascending order
😄
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.
This is where I got it https://stackoverflow.com/questions/1063007/how-to-sort-an-array-of-integers-correctly
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.
@joeldenning upd.
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.
Looks like it still has the unnecessary sort function?
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.
Does it not work if you call sort() without the callback? If it works without the callback, let’s remove the callback
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.
removed
@joeldenning ping. |
@joeldenning what do you think if we let the user to specify a port when running |
👍 sure |
No description provided.