Replies: 6 comments
-
Hi @Zearin, nice to see someone trying to get familiar with the codebase and maybe even I can learn something from this issue. I will try to respond to the best of my abilities:
|
Beta Was this translation helpful? Give feedback.
-
I've also been trying to learn the code base and I have to say, the last part that you mentioned is the most confusing. I often find myself starting at the beginning of the CLI execution and I just trace my way through each of the classes and methods lol. |
Beta Was this translation helpful? Give feedback.
-
Okay, I think I’d like to start another round of Q&A to get to know the codebase. I want to try to identify all parts of the codebase that fulfill certain roles. I’ll start with Config in this post. Config objects
|
Beta Was this translation helpful? Give feedback.
-
Files & PathsAccording to filenames, below is a list of all the files/classes that deal with files or paths (including “globs”). I’ll list path-related dependencies outside of the I’m trying to get a list of all path-related functionality here. I’m not trying to include I/O (read/write) operations. If a class does some of both, and its name implies more path-related purpose, then I’ll include it.
Here’s where you come in!Did I miss anything? Any observations about the above? |
Beta Was this translation helpful? Give feedback.
-
Next entry: Class constructor signatures. I created this gist with the signature of every constructor in Eleventy. Do you notice any patterns? |
Beta Was this translation helpful? Give feedback.
-
Are y’all okay if I move this to be a Discussion? Trying to separate out issues from discussion topics. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@zachleat I’ve been trying to become familiar with the Eleventy codebase, and there are a number of things I’ve wondered about the code’s structure.
Since v3 is on the horizon, I thought I’d try and aggregate some questions, so the answers may hopefully benefit others as well.
Errors
folder, but also several Error subclasses sprinkled throughout many files.throw new Error(...)
. Is this because they are less likely to occur?src/Template\*.js
files outnumber even thesrc/Eleventy\*.js
files. Is there a reason these aren’t grouped into a directory?getThing()
andget thing()
throughout. (And likewise for setters.) Is this just historical legacy from before getters and setters were supported syntax? Are there instances where you used thegetThing()
style because there would be a problem using aget thing()
?TemplateWriter
class, I even found the following snippet:Beta Was this translation helpful? Give feedback.
All reactions