Skip to content

Instantly share code, notes, and snippets.

@kyriediculous
Created July 8, 2022 12:22
Show Gist options
  • Save kyriediculous/0fc18db9446fdd625304380d84d6b1e4 to your computer and use it in GitHub Desktop.
Save kyriediculous/0fc18db9446fdd625304380d84d6b1e4 to your computer and use it in GitHub Desktop.
function loadTasks () {
const tasksPath = path.join(__dirname, 'tasks')
fs.readdirSync(tasksPath).forEach(task => {
require(`${tasksPath}/${task}`)
})
}
if (
fs.existsSync(path.join(__dirname, 'artifacts')) &&
fs.existsSync(path.join(__dirname, 'typechain-types'))
) {
loadTasks()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment