Skip to content

Commit

Permalink
Add afterBuild hook.
Browse files Browse the repository at this point in the history
Closes #91.
  • Loading branch information
cossssmin committed Jan 30, 2020
1 parent cb5841c commit 4e12a6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/generators/output/toDisk.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,10 @@ module.exports = async (env, spinner) => {
await fs.copy(globalConfig.build.assets.source, `${outputDir}/${globalConfig.build.assets.destination}`)
}

if (typeof globalConfig.events.afterBuild === 'function') {
const files = await glob(`${outputDir}/**/*.*`)
globalConfig.events.afterBuild(files)
}

return templates.length
}

0 comments on commit 4e12a6f

Please sign in to comment.