Skip to content

Instantly share code, notes, and snippets.

@ravinggenius
Last active January 4, 2016 13:19
Show Gist options
  • Save ravinggenius/8627337 to your computer and use it in GitHub Desktop.
Save ravinggenius/8627337 to your computer and use it in GitHub Desktop.
Rip code loading

System.require uses the following loaders:

package loader (only if module is part of a package)

load package module relative to ./lib/* (first-party) or ./vendor/**/lib/* (third-party)

System.require('package/file')

filesystem loader (available in a package or not)

load (non-)package module relative to current module

System.require('./some/other/file')

load (non-)package module at absolute path

System.require('/opt/file')

url loader (available in a package or not)

load module over network (should not be used except from trusted, secure network)

System.require('https://www.example.com/path/file')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment