Skip to content
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

Refactor, change where validation occurs #1721

Merged
merged 15 commits into from
Sep 15, 2018
Merged

Refactor, change where validation occurs #1721

merged 15 commits into from
Sep 15, 2018

Conversation

Rich-Harris
Copy link
Member

I'm abandoning #1718 (at least for now). The attempt gave me a sense of how we might structure the codebase slightly differently in order to make it easier to add alternative code generators. Before getting to that point, I wanted to address validation — currently, it's a bit of a convoluted and wasteful process, which could be made much easier by moving validation into the node constructors, instead of having a separate Validator class which duplicates a lot of stuff.

The other notable changes so far in this PR are that the internal Compiler class becomes Component (since it represents the component being compiled — it makes more sense to speak of e.g. component.transitions than compiler.transitions). This means that the existing Component class has been renamed to InlineComponent.

Also, the src/index.ts file has been radically simplified by moving things into the folders where they belong. My hope is that this will make it easier for people to ease their way into the codebase.

@Rich-Harris Rich-Harris changed the title [WIP] Refactor, change where validation occurs Refactor, change where validation occurs Sep 15, 2018
@Rich-Harris Rich-Harris merged commit 9031c16 into master Sep 15, 2018
@Rich-Harris Rich-Harris deleted the validation branch September 15, 2018 21:37
@Rich-Harris
Copy link
Member Author

Lots of follow-up work to happen here, but it can happen in follow-up PRs

@tanhauhau tanhauhau mentioned this pull request Oct 17, 2019
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant