-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add beforePublish and afterPublish hook (#293)
- Loading branch information
Eunjae Lee
authored
Oct 4, 2019
1 parent
e4f8cf9
commit 0de5d68
Showing
5 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import runStep from '../runStep'; | ||
|
||
export default ({ config }) => | ||
runStep( | ||
{ | ||
title: 'Running "afterPublish" callback.', | ||
skipIf: () => | ||
!config.afterPublish || typeof config.afterPublish !== 'function', | ||
}, | ||
async () => { | ||
await config.afterPublish(); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import runStep from '../runStep'; | ||
|
||
export default ({ config }) => | ||
runStep( | ||
{ | ||
title: 'Running "beforePublish" callback.', | ||
skipIf: () => | ||
!config.beforePublish || typeof config.beforePublish !== 'function', | ||
}, | ||
async () => { | ||
await config.beforePublish(); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters