webpack
Version:
Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.
34 lines • 4.93 kB
JavaScript
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([/*!**********************************!*\
!*** ./loaders/context/index.js ***!
\**********************************/
function(t,e,n){it("should be able to use a context with a loader",function(){var t="abc",e="script.coffee";n(/*! ../_resources */1)("./"+e).should.be.eql("coffee test"),n(/*! raw!../_resources */3)("./"+t+".txt").should.be.eql("abc")})},/*!*************************************!*\
!*** ./loaders/_resources ^\.\/.*$ ***!
\*************************************/
function(t,e,n){function r(t){return n(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./abc.txt":2,"./included.jade":5,"./parent.jade":6,"./script.coffee":8,"./template.jade":7};r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=1},/*!************************************!*\
!*** ./loaders/_resources/abc.txt ***!
\************************************/
function(){},/*!*****************************************************************!*\
!*** ./loaders/_resources (webpack)/~/raw-loader!^\.\/.*\.txt$ ***!
\*****************************************************************/
function(t,e,n){function r(t){return n(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./abc.txt":4};r.keys=function(){return Object.keys(i)},r.resolve=o,t.exports=r,r.id=3},/*!***********************************************************!*\
!*** (webpack)/~/raw-loader!./loaders/_resources/abc.txt ***!
\***********************************************************/
function(t){t.exports="abc"},/*!******************************************!*\
!*** ./loaders/_resources/included.jade ***!
\******************************************/
function(t,e,n){n(/*! (webpack)/~/jade/lib/runtime.js */11);t.exports=function(){var t=[];return t.push("<h1>included</h1>"),t.join("")}},/*!****************************************!*\
!*** ./loaders/_resources/parent.jade ***!
\****************************************/
function(t,e,n){n(/*! (webpack)/~/jade/lib/runtime.js */11);t.exports=function(t){var e,r=[];/*! ./loaders/_resources/included.jade */return r.push("<p></p>"+(null==(e=n(5).call(this,t))?"":e)),r.join("")}},/*!******************************************!*\
!*** ./loaders/_resources/template.jade ***!
\******************************************/
function(t,e,n){var r=n(/*! (webpack)/~/jade/lib/runtime.js */11);t.exports=function(t){var e,o=[],i=t||{},s=i.abc,a=i.self;/*! ./loaders/_resources/included.jade */return o.push("<p>"+r.escape(null==(e="undefined"==typeof s?"self"+a.abc:s)?"":e)+"</p>"+(null==(e=n(5).call(this,t))?"":e)),o.join("")}},/*!******************************************!*\
!*** ./loaders/_resources/script.coffee ***!
\******************************************/
function(t){var e,n;e=!0,n={text:"coffee test"},null!=e&&(t.exports=n.text)},,,/*!***************************************!*\
!*** (webpack)/~/jade/lib/runtime.js ***!
\***************************************/
function(t,e,n){"use strict";function r(t){return null!=t&&""!==t}function o(t){return Array.isArray(t)?t.map(o).filter(r).join(" "):t}e.merge=function i(t,e){if(1===arguments.length){for(var n=t[0],o=1;o<t.length;o++)n=i(n,t[o]);return n}var s=t["class"],a=e["class"];(s||a)&&(s=s||[],a=a||[],Array.isArray(s)||(s=[s]),Array.isArray(a)||(a=[a]),t["class"]=s.concat(a).filter(r));for(var u in e)"class"!=u&&(t[u]=e[u]);return t},e.joinClasses=o,e.cls=function(t,n){for(var r=[],i=0;i<t.length;i++)r.push(n&&n[i]?e.escape(o([t[i]])):o(t[i]));var s=o(r);return s.length?' class="'+s+'"':""},e.attr=function(t,n,r,o){return"boolean"==typeof n||null==n?n?" "+(o?t:t+'="'+t+'"'):"":0==t.indexOf("data")&&"string"!=typeof n?" "+t+"='"+JSON.stringify(n).replace(/'/g,"'")+"'":r?" "+t+'="'+e.escape(n)+'"':" "+t+'="'+n+'"'},e.attrs=function(t,n){var r=[],i=Object.keys(t);if(i.length)for(var s=0;s<i.length;++s){var a=i[s],u=t[a];"class"==a?(u=o(u))&&r.push(" "+a+'="'+u+'"'):r.push(e.attr(a,u,!1,n))}return r.join("")},e.escape=function(t){var e=String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");return e===""+t?t:e},e.rethrow=function s(t,e,r,o){if(!(t instanceof Error))throw t;if(!("undefined"==typeof window&&e||o))throw t.message+=" on line "+r,t;try{o=o||n(/*! fs */12).readFileSync(e,"utf8")}catch(i){s(t,null,r)}var a=3,u=o.split("\n"),c=Math.max(r-a,0),f=Math.min(u.length,r+a),a=u.slice(c,f).map(function(t,e){var n=e+c+1;return(n==r?" > ":" ")+n+"| "+t}).join("\n");throw t.path=e,t.message=(e||"Jade")+":"+r+"\n"+a+"\n\n"+t.message,t}},/*!*********************!*\
!*** external "fs" ***!
\*********************/
function(t){t.exports=require("fs")}]);