Skip to content

Instantly share code, notes, and snippets.

John-David Dalton jdalton

View GitHub Profile
View gz.js
'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()
View amd.sh
node ../lodash-cli/bin/lodash modularize exports=amd -o ./ && node ../lodash-cli/bin/lodash exports=amd -d -o ./main.js
You can’t perform that action at this time.