posva / Sounds Webpack Plugin
Licence: mit
🔊Notify or errors, warnings, etc with sounds
Stars: ✭ 125
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Sounds Webpack Plugin
Feflow
🚀 A command line tool aims to improve front-end engineer workflow and standard, powered by TypeScript.
Stars: ✭ 942 (+653.6%)
Mutual labels: webpack, plugin
Prepack Webpack Plugin
A webpack plugin for prepack.
Stars: ✭ 1,054 (+743.2%)
Mutual labels: webpack, plugin
Minimumaudioplugin
Minimum implementation of a native audio plugin for Unity
Stars: ✭ 33 (-73.6%)
Mutual labels: plugin, sound
Slinky
A light-weight, responsive, mobile-like navigation menu plugin
Stars: ✭ 649 (+419.2%)
Mutual labels: webpack, plugin
Blueprintsound
A plugin for Unreal Engine 4 that surfaces sound-related functionality to Blueprint.
Stars: ✭ 6 (-95.2%)
Mutual labels: plugin, sound
Dotenv Webpack
A secure webpack plugin that supports dotenv and other environment variables and only exposes what you choose and use.
Stars: ✭ 1,022 (+717.6%)
Mutual labels: webpack, plugin
Webpack Pwa Manifest
Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
Stars: ✭ 447 (+257.6%)
Mutual labels: webpack, plugin
Audiokitsynthone
AudioKit Synth One: Open-Source iOS Synthesizer App
Stars: ✭ 1,258 (+906.4%)
Mutual labels: plugin, sound
Serverless Plugin Webpack
Serverless Plugin Webpack
Stars: ✭ 72 (-42.4%)
Mutual labels: webpack, plugin
Offline Plugin
Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
Stars: ✭ 4,444 (+3455.2%)
Mutual labels: webpack, plugin
Fork Ts Checker Webpack Plugin
Webpack plugin that runs typescript type checker on a separate process.
Stars: ✭ 1,343 (+974.4%)
Mutual labels: webpack, plugin
Webpack Parallel Uglify Plugin
A faster uglifyjs plugin.
Stars: ✭ 456 (+264.8%)
Mutual labels: webpack, plugin
Skpm
💎📦 A utility to build and publish Sketch plugins
Stars: ✭ 890 (+612%)
Mutual labels: webpack, plugin
Serviceworker Webpack Plugin
Simplifies creation of a service worker to serve your webpack bundles. ♻️
Stars: ✭ 454 (+263.2%)
Mutual labels: webpack, plugin
notification-sounds
Makes a sound when a notification is shown
Stars: ✭ 16 (-87.2%)
Mutual labels: sound, notification
Craco Alias
A craco plugin for automatic aliases generation for Webpack and Jest
Stars: ✭ 56 (-55.2%)
Mutual labels: webpack, plugin
Cypress Webpack Preprocessor
Cypress preprocessor for bundling JavaScript via webpack
Stars: ✭ 93 (-25.6%)
Mutual labels: webpack, plugin
Sounds Webpack Plugin
Notify or errors, warnings, etc with sounds
Installation
npm install sounds-webpack-plugin
Usage
Basic usage with defaults
// webpack.config.js
const SoundsPlugin = require('sounds-webpack-plugin')
module.exports = {
plugins: [new SoundsPlugin()],
}
You can provide custom sounds to be loaded:
// webpack.config.js
const SoundsPlugin = require('sounds-webpack-plugin')
const path = require('path')
module.exports = {
plugins: [
new SoundsPlugin({
sounds: {
customSound: path.join(__dirname, 'sounds/error.mp3'),
customWarning: path.join(__dirname, 'sounds/warn.mp3'),
customSuccess: path.join(__dirname, 'sounds/ok.mp3'),
},
notifications: {
// invalid is a webpack hook
// you can check all hooks at https://github.com/webpack/webpack/blob/master/lib/Compiler.js#L32
// 'customSound' is the key provided in sounds
invalid: 'customSound',
// you can provide a function to customize it further
done(stats) {
if (stats.hasErrors()) {
this.play('customSound')
} else if (stats.hasWarnings()) {
this.play('customWarning')
} else {
this.play('customSuccess')
}
},
},
}),
],
}
You can provide 3 special values that are not webpack hooks: $hasErrors
, $hasWarnings
, $success
and $successAfterError
. You can check default values here. You can of course override any of them in sounds
option.
SoundsPlugin comes with 4 sounds:
-
oof
- used for errors by default -
nope
: -
xpError
: -
levelUp
: - used when the build succeeds after an error
SoundsPlugin uses play-sound under the hood. You can pass down options to the player with playerOptions
:
// webpack.config.js
const SoundsPlugin = require('sounds-webpack-plugin')
module.exports = {
plugins: [
new SoundsPlugin({
playerOptions: {
// check https://github.com/shime/play-sound#options
// osx uses afplay
},
}),
],
}
Related
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].