@@ -0,0 +1,2145 @@
+package net.symphonious.commonjs.loader;%0A%0Aimport net.symphonious.commonjs.ModuleLoader;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.nio.charset.Charset;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.NoSuchFileException;%0Aimport java.nio.file.Path;%0A%0A/**%0A * A simple ModuleLoader implementation that loads modules from the local filesystem.%0A *%0A * %3Cp%3E%3Cstrong%3EWarning:%3C/strong%3E no validation is done to verify that required modules have not maliciously attempted to load files from outside of %7B@literal baseDir%7D.%0A * This class should not be used to compile user-supplied modules.%3C/p%3E%0A *%0A * %3Cp%3EModules are expected to be in files with the same sub-path under %7B@literal baseDir%7D as their module ID with the suffix %7B@literal .js%7D. For example the module %7B@literal lib/myModule%7D%0A * should be in the file %7B@literal %3CbaseDir%3E/lib/myModule.js%7D%3C/p%3E%0A */%0Apublic class FileSystemModuleLoader implements ModuleLoader%0A%7B%0A    private final Path baseDir;%0A    private final Charset charset;%0A%0A    /** Create a new loader that loads files from under %7B@literal baseDir%7D using the character set %7B@literal charset%7D.%0A     *%0A     * @param baseDir the directory to load module from.%0A     * @param charset the character set to use when reading files.%0A     */%0A    public FileSystemModuleLoader(final File baseDir, final Charset charset)%0A    %7B%0A        this(baseDir.toPath(), charset);%0A    %7D%0A%0A    /** Create a new loader that loads files from under %7B@literal baseDir%7D using the character set %7B@literal charset%7D.%0A     *%0A     * @param baseDir the directory to load module from.%0A     * @param charset the character set to use when reading files.%0A     */%0A    public FileSystemModuleLoader(final Path baseDir, final Charset charset)%0A    %7B%0A        this.baseDir = baseDir;%0A        this.charset = charset;%0A    %7D%0A%0A    @Override%0A    public String loadModule(final String moduleId) throws IOException%0A    %7B%0A        try%0A        %7B%0A            return new String(Files.readAllBytes(baseDir.resolve(moduleId + %22.js%22)), charset);%0A        %7D%0A        catch (final NoSuchFileException e)%0A        %7B%0A            return null;%0A        %7D%0A    %7D%0A%7D%0A

Add a basic FileSystemModuleLoader.