Published almost 4 years ago

Requiring Files

Learn about how to require files in Crystal. You'll also learn that using wildcard requires with '*' will require files in the folder alphabetically, and what issues this might cause.

Comments - Thanks for explaining that gotcha. So, I guess it's safer to _always_ declare required deps? maybe even with a "./models/**" search path? - I'm glad that was helpful. I tend to still only require when necessary. The compiler will catch if it doesn't have access to it so it isn't safer to always declare them. With that said if you always declare them it doesn't hurt!