Created
April 11, 2017 00:10
-
-
Save kenwheeler/330c863e76cab851745e3a354fe63a6a to your computer and use it in GitHub Desktop.
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
var player = require('play-sound')((opts = {})); | |
var path = require('path'); | |
function JeopardyPlugin(options) {} | |
JeopardyPlugin.prototype.apply = function(compiler) { | |
var audio; | |
compiler.plugin('compile', function() { | |
var build = path.join(process.cwd(), '/configuration/webpack/jeopardy.mp3'); | |
audio = player.play(build); | |
}); | |
compiler.plugin('done', function() { | |
audio.kill(); | |
var end = path.join(process.cwd(), '/configuration/webpack/end.mp3'); | |
audio = player.play(end); | |
}); | |
}; | |
module.exports = JeopardyPlugin; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment