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.
41 lines • 6.04 kB
JavaScript
!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([/*!**********************************!*\
!*** ./parsing/context/index.js ***!
\**********************************/
function(t,e,r){var n,n;it("should be able to load a file with the require.context method",function(){r(/*! ./templates */1)("./tmpl").should.be.eql("test template"),r(/*! ./././templates */1)("./tmpl").should.be.eql("test template"),r(/*! ././templates/. */1)("./tmpl").should.be.eql("test template"),r(/*! ././templates */1)("./subdir/tmpl.js").should.be.eql("subdir test template"),r(/*! ./templates */7)("xyz").should.be.eql("xyz")}),it("should automatically create contexts",function(){var t="tmpl",e="./tmpl.js",n="mp",o="tmp",i="mpl";r(/*! ./templates */1)("./"+t).should.be.eql("test template"),r(/*! ./templates */8)("./"+o+"l").should.be.eql("test template"),r(/*! ./templates */11)("./t"+i).should.be.eql("test template"),r(/*! ./templates */12)("./t"+n+"l").should.be.eql("test template"),r(/*! ./templates/templateLoader */3)(e).should.be.eql("test template"),r(/*! ./templates/templateLoaderIndirect */4)(e).should.be.eql("test template")}),it("should be able to require.resolve with automatical context",function(){var t="tmpl";r(/*! ./templates */1).resolve("./"+t).should.be.eql(2)}),it("should be able to use renaming combined with a context",function(){(n=function(){})("fail");var t="tmpl";r(/*! ./templates */1)("./"+t).should.be.eql("test template")}),it("should compile an empty context",function(){(function(){!function(){var t=new Error('Cannot find module "./templates"');throw t.code="MODULE_NOT_FOUND",t}()}).toString().should.not.match(/require/)}),it("should execute an empty context",function(){var t;(function(){t=r(/*! ./templates/ */10)}).should.not.throw(),function(){t("")}.should.throw()})},/*!********************************************!*\
!*** ./parsing/context/templates ^\.\/.*$ ***!
\********************************************/
function(t,e,r){function n(t){return r(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./subdir/tmpl":5,"./subdir/tmpl.js":5,"./templateLoader":3,"./templateLoader.js":3,"./templateLoaderIndirect":4,"./templateLoaderIndirect.js":4,"./tmpl":2,"./tmpl.js":2};n.keys=function(){return Object.keys(i)},n.resolve=o,t.exports=n,n.id=1},/*!*******************************************!*\
!*** ./parsing/context/templates/tmpl.js ***!
\*******************************************/
function(t){t.exports="test template"},/*!*****************************************************!*\
!*** ./parsing/context/templates/templateLoader.js ***!
\*****************************************************/
function(t,e,r){t.exports=function(t){/*! . */
return r(1)(t)}},/*!*************************************************************!*\
!*** ./parsing/context/templates/templateLoaderIndirect.js ***!
\*************************************************************/
function(t,e,r){function n(t,e){return t(e)}t.exports=function(t){var e=n(r(/*! . */1),t),o=r(/*! . */1)(t);return e!==o?"FAIL":e}},/*!**************************************************!*\
!*** ./parsing/context/templates/subdir/tmpl.js ***!
\**************************************************/
function(t){t.exports="subdir test template"},/*!********************************************!*\
!*** ./parsing/context/templates/~/xyz.js ***!
\********************************************/
function(t){t.exports="xyz"},/*!*************************************!*\
!*** ./parsing/context/templates . ***!
\*************************************/
function(t,e,r){function n(t){return r(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./subdir/tmpl":5,"./subdir/tmpl.js":5,"./templateLoader":3,"./templateLoader.js":3,"./templateLoaderIndirect":4,"./templateLoaderIndirect.js":4,"./tmpl":2,"./tmpl.js":2,xyz:6,"xyz.js":6};n.keys=function(){return Object.keys(i)},n.resolve=o,t.exports=n,n.id=7},/*!*********************************************!*\
!*** ./parsing/context/templates ^\.\/.*l$ ***!
\*********************************************/
function(t,e,r){function n(t){return r(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./subdir/tmpl":5,"./tmpl":2};n.keys=function(){return Object.keys(i)},n.resolve=o,t.exports=n,n.id=8},/*!*******************************************************!*\
!*** ./parsing/context/templates ^\.\/notExisting.*$ ***!
\*******************************************************/
function(t){function e(t){throw new Error("Cannot find module '"+t+"'.")}e.resolve=e,e.keys=function(){return[]},t.exports=e},/*!****************************************************!*\
!*** ./parsing/context/templates ^\.\/notExisting ***!
\****************************************************/
function(t){function e(t){throw new Error("Cannot find module '"+t+"'.")}e.resolve=e,e.keys=function(){return[]},t.exports=e},/*!*********************************************!*\
!*** ./parsing/context/templates ^\.\/t.*$ ***!
\*********************************************/
function(t,e,r){function n(t){return r(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./templateLoader":3,"./templateLoader.js":3,"./templateLoaderIndirect":4,"./templateLoaderIndirect.js":4,"./tmpl":2,"./tmpl.js":2};n.keys=function(){return Object.keys(i)},n.resolve=o,t.exports=n,n.id=11},/*!**********************************************!*\
!*** ./parsing/context/templates ^\.\/t.*l$ ***!
\**********************************************/
function(t,e,r){function n(t){return r(o(t))}function o(t){return i[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var i={"./tmpl":2};n.keys=function(){return Object.keys(i)},n.resolve=o,t.exports=n,n.id=12}]);