wc.compile() - shysolocup/willclient GitHub Wiki
- Description: Compiles files from a given folder path into the wc instance
Parameters
- call
String
: Name used to reference the compiled stuff
- path
String
: The path for the folder that it compiles
- ?ignore
Array
: Files that it ignores (automatically ignores index.js files)
- ?action
Function
: Action it does for the file (automatically just runs it)
- ?json
Boolean
: If it should include .json files or not
Setup
wc.compile("folder", "src/classes/folder")
wc.compile("folder", "src/classes/folder", ["index.js"] )
wc.compile("folder", "src/classes/folder", ["index.js"], (path, file) => { require(`../../${path}/${file}`); })
wc.compile("folder", "src/classes/folder", ["index.js"], (path, file) => { require(`../../${path}/${file}`); }, true)