This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
compile
should accept either file path or prebuilt sources object
#15
Labels
The
compile
function takes aHuffCompilerArgs
type as input.The
filePath
value is then passed toparseFile
which passes it togetAllFileContents
.getAllFileContents
then reads the main file and all its imports and builds an object with the file contents of the main file and all its imports.We should replace this with a more common pattern for compiler packages, where you can either provide an input file path or a prebuilt sources object containing all the file contents. This will make it possible to use huffc in environments without access to the filesystem, such as browsers.
The text was updated successfully, but these errors were encountered: