Add -w shorthand for --watch CLI flag #1276
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there! I noticed the
help-wanted
label on #1145 and thought it might be a nice way to learn how to contribute to one of my fav open source projects, so I've had a try at it. Hopefully I've done a decent job here but no stress if not and you need to reject or point me at some extra steps, or if you're just a little too busy for this kind of thing right now! πThe code change here was really tiny. I looked into adding some tests in
test/cli/shared/watch.dart
but it looks like the shorthand functionality is coming fromArgParser
so I wasn't sure how much of the existing--watch
tests you'd wanna duplicate for verifying that. I've signed the CLA and checked the branch withpub run grinder
,dartanalyzer lib test
andpub run test -x node
so I think I covered those bases anyway. Here's how it looks in the example output when I dodart2native -o bin/sass bin/sass.dart && ./bin/sass
. Seems to come through automatically, which is nice!I've done some manual testing locally too and it's working great. Oh and I have a
sass-site
commit ready documenting the new shorthand in case you're keen to have that right away. It occurred to me though that you might also wanna delay shipping that for a moment or two to give the new flag a chance to propagate among the install base first.Let me know if there's a specific bit of automated testing you'd like me to add, or if I've just completely missed the mark here! It's been fun getting this far and I'm happy to do a bit of extra work on this PR or close it unmerged if necessary!