-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Support asconfig.json #1238
Support asconfig.json #1238
Conversation
Regarding the algorithm, I'm wondering if this can be integrated into Edit: Oh, wait, this operates on args, not opts. But perhaps there is a way to put all of this into |
It looks like enabled and disabled logic is more complicated than I thought. Because the cli provides a string array, it needs to be treated as a set of immutable flags by the time it gets passed to resolve the asconfig. What's more difficult is that each nested asconfig level needs to handle enable and disable flags before they get overridden by the cli. I am proposing that the |
Restarting my efforts here. Need to think this through a little bit more. |
…ter use, dedupe argv, transform, and lib
Progress:
We still need to add some testing projects in the repo to verify this functionality works. This pull request is becoming much larger than I previously thought. |
@dcodeIO If perhaps someone would like to extend multiple configs to obtain their entry points, this becomes impossible because Example, I have a library that would like to obtain lib entries from two distinct projects: {
"targets": {
"release": {
"optimizeLevel": 3,
"shrinkLevel": 2
}
},
"extends": [
"./node_modules/@assemblyscript/node/asconfig.json",
"./node_modules/some-utf8-lib/asconfig.json"
]
} Now both sets of lib entries are added to the compilation. Thoughts? |
Looks like this is getting dangerously close to substituting what imports would do, but given that the same isn't achievable with just imports when it comes to additional entries or similar, I'm not necessarily opposed to allow |
Why not both? Sounds good to me. |
I've switched to supporting an MVP in this pull request again. Just taking a bit of time to figure out how to do testing. I suspect I'll be ready for review in a week. |
Problem with the wat file seems to be here. Moving that below the |
I'm sorry, what do you mean by "that?" |
I mean the linked declaration of |
Oh I see. I thought this was my fault 😅 . Yeah. Let's pull that out into a separate PR. Just wondering if everything here is appropriately addressed now? |
Merging master should fix the wat problem. |
Please let me know if I can help finish this. I am very excited to refactor my cli completely to account for asconfig. |
Looks good to merge once CI passed, unless there are remaining objections? |
I wish I could extend multiple configurations, but I really like the elegance of this algorithm using a |
Looks like it's all set. |
🎉 This PR is included in version 0.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Turned out that |
Right. Should we add a test to make sure browserified bundles work? |
I gave this change a lot of thought before I even started coding it, but I bet there are multiple ways to improve this pull request.
Todo:
asconfig.include
? (string[]
)