Introduce --codegen argument so targets can be specified explicitly#3324
Merged
garyb merged 6 commits intopurescript:masterfrom Apr 27, 2018
Merged
Introduce --codegen argument so targets can be specified explicitly#3324garyb merged 6 commits intopurescript:masterfrom
--codegen argument so targets can be specified explicitly#3324garyb merged 6 commits intopurescript:masterfrom
Conversation
Member
Author
|
Any thoughts/comments about this @kritzcreek @LiamGoodacre @hdgarrood? |
Contributor
|
👍 I like this a lot! |
kritzcreek
approved these changes
Apr 27, 2018
| targetParser :: Opts.ReadM [P.CodegenTarget] | ||
| targetParser = | ||
| Opts.str >>= \s -> | ||
| for (T.split (== ',') s) |
Member
There was a problem hiding this comment.
Do we want to be a bit more lenient here and strip the text after splitting?
Member
Author
There was a problem hiding this comment.
I'm not sure how you'd get spaces into that value anyway? Since --codegen js, corefn wouldn't parse as one thing.
Member
There was a problem hiding this comment.
Yeah, that's what I'd expect to happen
Member
|
Awesome. No comments other than what @kritzcreek raised. 💯 |
kritzcreek
reviewed
Apr 27, 2018
app/Command/Compile.hs
Outdated
| $ maybe (Opts.readerError targetsMessage) pure | ||
| . flip M.lookup targets | ||
| . T.unpack | ||
| . T.takeWhile (/= ' ') |
Member
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
Thanks, couldn't find that when I looked through the docs before!
99547dd to
c40b016
Compare
LiamGoodacre
approved these changes
Apr 27, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #3196, closes #3258
Default is
js, usingsourcemapsimpliesjsand the separate option for source maps is gone now.Thanks to @gabejohnson for doing the first part of this!