Skip to content

Instantly share code, notes, and snippets.

View jdalton's full-sized avatar

John-David Dalton jdalton

View GitHub Profile
@jdalton
jdalton / gz.js
Last active June 7, 2021 22:17
'use strict'
const fs = require('fs')
const path = require('path')
const zlib = require('zlib')
require.extensions['.gz'] =
require.extensions['.js.gz'] = (module, filename) => {
if (path.extname(filename.slice(0, -3)) === '.js') {
let content = zlib.unzipSync(fs.readFileSync(filename)).toString()
@jdalton
jdalton / amd.sh
Last active August 10, 2016 19:17
node ../lodash-cli/bin/lodash modularize exports=amd -o ./ && node ../lodash-cli/bin/lodash exports=amd -d -o ./main.js