Skip to content

low-rb/lowload

Repository files navigation

Gem version GitHub repo Codeberg repo

LowLoad

LowLoad is really dumb; like a bull in a china shop, smashing through fragile dependencies to autoload your code without manual require_relative calls.

First it goes through all your files and notes their constant definitions and their file paths. Then it goes through the same directories again and loads each file into Ruby, but this time loading that file's dependencies first which we now know the location of. It doesn't wait to encounter an unknown constant then load that constant from a module namespace that matches your folder structure, that would be dumb.

File Types

LowLoad supports normal Ruby (.rb) files as well as a few other embedded formats.

RBX

LowLoad supports loading RBX files. RBX files are Ruby files containing HTML markup with the file extension .rbx.

Antlers

Antlers syntax such as <{ ChildNode }> can be embedded inside the render method of your RBX file.

Philosophy

  • Folders are often organised by the kind of file it is, a bunch of views for example. But namespaces should be organised by your domain — they should be different
  • You should be able to mix autoloading with manual require calls for stuff like gems, and you can even keep using require_relative when you feel like it

Installation

Add gem 'lowload' to your Gemfile then:

bundle install

About

An autoloader that is dumb but lets you be yourself

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors