Skip to content

Instantly share code, notes, and snippets.

View michaeljota's full-sized avatar

Michael De Abreu michaeljota

  • Now on Worldwide
View GitHub Profile
@michaeljota
michaeljota / webpack-shell-plugin.js
Last active March 27, 2019 16:28
A webpack shell plugin to hock command after and before the build. All credits to original author: Yair Tavor. http://stackoverflow.com/a/35337516. I just classed it.
'use strict';
const exec = require('child_process').exec;
function puts(error, stdout, stderr) {
console.log(stdout);
}
class WebpackShellPlugin {
constructor(options) {
@michaeljota
michaeljota / colorGenerator.ts
Created October 19, 2016 14:07
A simple random hex color generator.
interface IColorGradient {
min: number;
max: number;
};
interface IDefaultGradients {
red?: IColorGradient;
green?: IColorGradient;
blue?: IColorGradient;
}