From 06f4743f5147156ee4d2ef5d6007824c69bf7d54 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 30 Sep 2012 02:04:16 -0700 Subject: [PATCH] Add lodash.underscore.min.js. Former-commit-id: 15592a33a6f6979a1d60632a6ade3c341f13d0e7 --- build.js | 8 ++++++-- build/minify.js | 2 +- lodash.underscore.min.js | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 lodash.underscore.min.js diff --git a/build.js b/build.js index d6ae3204f..831d3eda0 100755 --- a/build.js +++ b/build.js @@ -1411,7 +1411,9 @@ !_.isEqual(exportsOptions, exportsAll); // used to name temporary files created in `dist/` - var workingName = 'lodash' + (isTemplate ? '.template' : isCustom ? '.custom' : ''); + var workingName = outputPath + ? path.basename(outputPath, '.js') + : 'lodash' + (isTemplate ? '.template' : isCustom ? '.custom' : ''); // restore `dependencyMap` dependencyMap = dependencyBackup; @@ -1427,7 +1429,9 @@ } // begin the minification process if (!isDebug) { - workingName += '.min'; + if (!outputPath) { + workingName += '.min'; + } minify(source, { 'isSilent': isSilent, 'isTemplate': isTemplate, diff --git a/build/minify.js b/build/minify.js index fc3a304b5..baea4e074 100755 --- a/build/minify.js +++ b/build/minify.js @@ -37,7 +37,7 @@ * The exposed `minify` function minifies a given Lo-Dash `source` and invokes * the `onComplete` callback when finished. * - * @param {Array|String} [source=''] THe source to minify or array of commands. + * @param {Array|String} [source=''] The source to minify or array of commands. * @param {Object} [options={}] The options object. */ function minify(source, options) { diff --git a/lodash.underscore.min.js b/lodash.underscore.min.js new file mode 100644 index 000000000..4e836e56a --- /dev/null +++ b/lodash.underscore.min.js @@ -0,0 +1,36 @@ +/*! + Lo-Dash 0.7.0 lodash.com/license + Underscore.js 1.4.0 underscorejs.org/LICENSE +*/ +;(function(e,t){function s(e,t,r){var s,t=T(t,r),o=e.length,r=-1;if(o===+o){for(;++rarguments.length,t=T(t,r),f=e.length;s=-1;if(f===+f)for(a&&(u=e[++s]);++s=(n||$),s=i?{}:e;if(i)for(var o=t-1;++on||e===t)return 1;if(earguments.length;if(s!==+s)var u=Pt(e),s=u.length;return f(e,function(a,f,l){f=u?u[--s]:--s,n= +o?(o=i,e[f]):t.call(r,n,e[f],f,l)}),n}function D(e,t,n){return t==r||n?e[0]:ft.call(e,0,t)}function P(e,t){for(var n,r=-1,i=e.length,s=[];++rn?gt(0,i+n):n)-1}for(;++rr&&(r=n,o=e[i]);return o}function j(e,t,n){return ft +.call(e,t==r||n?1:t)}function F(e,t,n,r){for(var i=0,s=e.length,n=T(n,r),t=n(t);i>>1,n(e[r])H(a,r))a.push(r),u.push(e[s]);return u}function q(e,t){return Lt||ct&&2|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,Q=/&(?:amp|lt|gt|quot|#x27);/g,G=/\b__p\+='';/g,Y=/\b(__p\+=)''\+/g,Z=/(__e\(.*?\)|\b__t\))\+'';/g +,et=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,tt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),nt=/($^)/,rt=/[&<>"']/g,it=/['\n\r\t\u2028\u2029\\]/g,st=W.concat,ot=X.hasOwnProperty,ut=W.push,at=X.propertyIsEnumerable,ft=W.slice,lt=X.toString,ct=tt.test(ct=ft.bind)&&ct,ht=Math.floor,pt=tt.test(pt=Object.getPrototypeOf)&&pt,dt=tt.test(dt=Array.isArray)&&dt,vt=e.isFinite,mt=tt.test(mt=Object.keys)&&mt,gt=Math.max,yt=Math.min,bt=Math.random +,wt="[object Boolean]",Et="[object Date]",St="[object Number]",xt="[object Object]",Tt="[object RegExp]",Nt="[object String]",Ct=e.clearTimeout,kt=e.setTimeout,Lt=ct&&/\n|Opera/.test(ct+lt.call(e.opera)),At={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Ot={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};w.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},w.isArguments=function( +e){return"[object Arguments]"==lt.call(e)},w.isArguments(arguments)||(w.isArguments=function(e){return!!e&&!!ot.call(e,"callee")});var Mt=dt||function(e){return"[object Array]"==lt.call(e)};A(/x/)&&(A=function(e){return"[object Function]"==lt.call(e)});var X=pt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=pt(t))&&pt(n);return n?e==n||pt(e)==n&&!isArguments(e):O(e)}:O,_t={"&":"&","<":"<",">":">",'"':""","'":"'"},Dt=b(_t),Pt=mt?function( +e){return"function"==typeof e&&at.call(e,"prototype")?y(e):mt(e)}:y;w.VERSION="0.7.0",w.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},w.bind=q,w.bindAll=function(e){var t,n=e,r=e,i=arguments,s=i.length;if(1H(o,t)){for(var u=1;un?gt(0,r+n):yt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},w.map=a,w.max=B,w.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return ot.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},w.min=function(e,t,n){for(var r=Infinity,i=-1,s=e?e.length:0,o=r,t=T(t,n);++iH(a,r))o[r]=i;return o},w.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},w.pairs=function(e){var t,n,r=[];for(t in e)ot.call(e,t)&&(n=e[t],r.push([t,n]));return r},w.pick=function(e,t,n){var r,i,s=e,o={};if("function"!=typeof t){var s=st.apply(W,arguments),u=s.length;for(r=1;r=f?(a=r,s=e.apply(o,i)):u||(u=kt(n,f)),s}},w.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++rH(r,t[e])&&r.push(t[e]);return r},w.uniq=I,w.uniqueId=function(e){var t=V++;return e?e+t:t},w.values=d,w.where=function(e,t){var r,i,s=[],o=[];m(t,function(e,t){o.push(t)});var u=o.length,a=e.length;r=-1;if(a===+a)for(;++r