Skip to content

wc.build()

paige edited this page Aug 28, 2023 · 3 revisions
  • Description: Runs files from a given folder path

Parameters

  • path String: The path for the folder that it runs through
  • ?ignore Array: Files that it ignores (automatically ignores index.js files)
  • ?action Function: Action it does for the file (automatically just runs it)

Setup

wc.build("src/commands/folder")

wc.build("src/commands/folder", ["index.js"] )

wc.build("src/commands/folder", ["index.js"], (path, file) => { require(`../../${path}/${file}`); })
Clone this wiki locally