Skip to content

Instantly share code, notes, and snippets.

@tdooner
Created September 25, 2014 23:44
Show Gist options
  • Save tdooner/be606558ae91996dcbd2 to your computer and use it in GitHub Desktop.
Save tdooner/be606558ae91996dcbd2 to your computer and use it in GitHub Desktop.
diff --git a/webpack.config.js b/webpack.config.js
index ff2c436..b779dbc 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,6 +1,7 @@
/* global __dirname:false */
-var webpack = require('webpack');
+var webpack = require('webpack'),
+ exec = require('child_process').exec;
module.exports = {
// for every key under 'entry', a JS file will be created in output.
@@ -58,7 +59,23 @@ module.exports = {
// @see https://console.developers.google.com
GOOGLE_API_CLIENT_ID: "'803535453852-drbc3bdsk9tqkpn56cigp8oukkkr72la.apps.googleusercontent.com'",
GOOGLE_API_KEY: "'SEbpn0ikI6EdCXi1nrMvFFy8'",
- })
+ }),
+ {
+ apply: function(compiler) {
+ compiler.plugin("compile", function(compilation) {
+ exec('tmux set status-left-bg colour58');
+ });
+ compiler.plugin("done", function(compilation) {
+ if (compilation.hasErrors()) {
+ exec('tmux set status-left-bg red');
+ } else if (compilation.hasWarnings()) {
+ exec('tmux set status-left-bg yellow');
+ } else {
+ exec('tmux set status-left-bg green');
+ }
+ });
+ }
+ }
],
externals: {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment