Skip to content

wc.compile()

paige edited this page Aug 28, 2023 · 3 revisions
  • 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)
Clone this wiki locally