minifyify
Version:
Minify your browserify bundles without losing the sourcemap
37 lines (27 loc) • 1.89 kB
JavaScript
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
// submodule.js NOT_MINIFIED
var subsubmodule = require('../dirB/subsubmodule');
module.exports = {
createString: function (mathFunction) {
var date
, someNumber;
date = subsubmodule.getTheDate(function () {
var potatoes;
potatoes = ['fried', 'baked', 'sliced'];
return potatoes.join(mathFunction());
});
someNumber = mathFunction();
return date + ' ' + someNumber;
}
};
},{"../dirB/subsubmodule":2}],2:[function(require,module,exports){
var getTheDate=function(e){var t=e();return"Wed Dec 31 1969 22:30:23 GMT-0800 (PST) "+t};module.exports={getTheDate:getTheDate};
},{}],3:[function(require,module,exports){
var submodule=require("./dirA/submodule"),jsonthing=require("./jsonthing.json"),myString,actual,expected;myString=submodule.createString(function(){var e=20;return e*=1337,"potato #"+e+jsonthing.turkey}),actual=document.createElement("pre"),expected=document.createElement("pre"),actual.innerHTML="Actual: "+myString,expected.innerHTML="Expected: Wed Dec 31 1969 22:30:23 GMT-0800 (PST) friedpotato #26740salmonbakedpotato #26740salmonsliced potato #26740salmon",document.body.appendChild(actual),document.body.appendChild(expected);
},{"./dirA/submodule":1,"./jsonthing.json":4}],4:[function(require,module,exports){
module.exports={
"unminified": "jsonthing.json",
"turkey": "salmon"
}
},{}]},{},[3])
//# sourceMappingURL=bundle.map