Open
Conversation
…ilation works after removing previous _site
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.
This PR basically restructures the project to obtain a clean TS build that compiles even with "strict" TS checking. Even though there are still some "unknown" types that had to be used (because some dependencies like "bit-field" and "onml" didn't have types to import) their use is limited.
The methodology of converting 11ty to TS support is by doing a two step compilation process of (TS -> JS and JS ->
11ty).A summary of the changes (listed in order of the file changes) is shown below:
11typarse them (because11tyautomatically ignores the files in.gitignore), I had to create a separate.eleventyignorefile.eleventy.config.jsis a lot simpler now because the custom frontend TS logic is just replaced by thetsccompiler. Only things remaining now are some Passthrough Copies.concurrentlyto package.json to runtscand11tyat the same time, added some more types packages, and had to overrideminimatchdue to a vulnerability that11tyhasn't fixed yet._datastayed as JS, but they are super simple so its probably fine. All file imports should import the.jsversion of a file now.layout.njknow allows for a list of custom CSS files to be added to a page, and thestyle.csswas split into 4 to allow for better modularization in the future.permalinktag in Nunjucks, I moved all our njk files into thepagesfolder rather than having a single folder for a single njk file.hardcodedData.ts, and types intotypes.d.tswhich doesn't need to be imported which is pretty nice.types.d.tsalso declares some modules to help reduce types errors with "bit-field" and "onml" imports.loadExtensions.ts,loadInstructions.ts, andsearch.tsall have enough type definitions to preventtscerrors when runningnpm run check(alias totsc --noEmit), but I did not type everything to reduce code clutter.