(dist) build
This commit is contained in:
parent
770c3ca914
commit
b25c0be5c7
2
dist/less-1.0.21.js
vendored
2
dist/less-1.0.21.js
vendored
@ -2137,7 +2137,7 @@ function createCSS(styles, sheet, lastModified) {
|
||||
var css;
|
||||
|
||||
// Strip the query-string
|
||||
var href = sheet.href.replace(/\?.*$/, '');
|
||||
var href = sheet.href ? sheet.href.replace(/\?.*$/, '') : '';
|
||||
|
||||
// If there is no title set, use the filename, minus the extension
|
||||
var id = 'less:' + (sheet.title || href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]);
|
||||
|
8
dist/less-1.0.21.min.js
vendored
8
dist/less-1.0.21.min.js
vendored
@ -6,10 +6,10 @@
|
||||
// Licensed under the Apache 2.0 License.
|
||||
//
|
||||
(function(u){function q(b){return u.less[b.split("/")[1]]}function O(b){if(!document.querySelectorAll&&typeof jQuery==="undefined")x("no selector method found.");else return(document.querySelectorAll||jQuery).call(document,b)}function K(b,a){for(var d=0;d<G.length;d++)L(G[d],b,a,G.length-(d+1))}function L(b,a,d,f){var e=b.href.replace(/\?.*$/,""),i=y&&y.getItem(e),j=y&&y.getItem(e+":timestamp"),k={css:i,timestamp:j};P(b.href,function(o,r){if(!d&&k&&(new Date(r)).valueOf()===(new Date(k.timestamp)).valueOf()){D(k.css,
|
||||
b);a(null,b,{local:true,remaining:f})}else(new p.Parser({optimization:p.optimization,paths:[e.replace(/[\w\.-]+$/,"")]})).parse(o,function(t,s){if(t)return M(t,e);try{a(s,b,{local:false,lastModified:r,remaining:f});Q(document.getElementById("less-error-message:"+e.replace(/[^a-z]+/gi,"-")))}catch(E){M(E,e)}})},function(o,r){throw new Error("Couldn't load "+r+" ("+o+")");})}function D(b,a,d){var f,e=a.href.replace(/\?.*$/,"");a="less:"+(a.title||e.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]);if((f=document.getElementById(a))===
|
||||
null){f=document.createElement("style");f.type="text/css";f.media="screen";f.id=a;document.getElementsByTagName("head")[0].appendChild(f)}if(f.styleSheet)try{f.styleSheet.cssText=b}catch(i){throw new Error("Couldn't reassign styleSheet.cssText.");}else(function(j){if(f.childNodes.length>0)f.firstChild.nodeValue!==j.nodeValue&&f.replaceChild(j,f.firstChild);else f.appendChild(j)})(document.createTextNode(b));if(d&&y){x("saving "+e+" to cache.");y.setItem(e,b);y.setItem(e+":timestamp",d)}}function P(b,
|
||||
a,d){function f(j,k,o){if(j.status>=200&&j.status<300)k(j.responseText,j.getResponseHeader("Last-Modified"));else typeof o==="function"&&o(j.status,b)}var e=R(),i=F?false:p.async;e.open("GET",b,i);e.send(null);if(F)e.status===0?a(e.responseText):d(e.status);else if(i)e.onreadystatechange=function(){e.readyState==4&&f(e,a,d)};else f(e,a,d)}function R(){if(u.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){x("browser doesn't support AJAX.");return null}}
|
||||
function Q(b){return b&&b.parentNode.removeChild(b)}function x(b){p.env=="development"&&typeof console!=="undefined"&&console.log("less: "+b)}function M(b,a){var d="less-error-message:"+a.replace(/[^a-z]+/ig,"-");if(!b.extract)throw b;var f=document.createElement("div"),e;f.id=d;f.className="less-error-message";f.innerHTML="<h3>"+(b.message||"There is an error in your .less file")+'</h3><p><a href="'+a+'">'+a+"</a> on line "+b.line+", column "+(b.column+1)+":</p>"+'<div>\n<pre class="ctx"><span>[-1]</span>{0}</pre>\n<pre><span>[0]</span>{current}</pre>\n<pre class="ctx"><span>[1]</span>{2}</pre>\n</div>'.replace(/\[(-?\d)\]/g,
|
||||
b);a(null,b,{local:true,remaining:f})}else(new p.Parser({optimization:p.optimization,paths:[e.replace(/[\w\.-]+$/,"")]})).parse(o,function(t,s){if(t)return M(t,e);try{a(s,b,{local:false,lastModified:r,remaining:f});Q(document.getElementById("less-error-message:"+e.replace(/[^a-z]+/gi,"-")))}catch(E){M(E,e)}})},function(o,r){throw new Error("Couldn't load "+r+" ("+o+")");})}function D(b,a,d){var f,e=a.href?a.href.replace(/\?.*$/,""):"";a="less:"+(a.title||e.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]);
|
||||
if((f=document.getElementById(a))===null){f=document.createElement("style");f.type="text/css";f.media="screen";f.id=a;document.getElementsByTagName("head")[0].appendChild(f)}if(f.styleSheet)try{f.styleSheet.cssText=b}catch(i){throw new Error("Couldn't reassign styleSheet.cssText.");}else(function(j){if(f.childNodes.length>0)f.firstChild.nodeValue!==j.nodeValue&&f.replaceChild(j,f.firstChild);else f.appendChild(j)})(document.createTextNode(b));if(d&&y){x("saving "+e+" to cache.");y.setItem(e,b);y.setItem(e+
|
||||
":timestamp",d)}}function P(b,a,d){function f(j,k,o){if(j.status>=200&&j.status<300)k(j.responseText,j.getResponseHeader("Last-Modified"));else typeof o==="function"&&o(j.status,b)}var e=R(),i=F?false:p.async;e.open("GET",b,i);e.send(null);if(F)e.status===0?a(e.responseText):d(e.status);else if(i)e.onreadystatechange=function(){e.readyState==4&&f(e,a,d)};else f(e,a,d)}function R(){if(u.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){x("browser doesn't support AJAX.");
|
||||
return null}}function Q(b){return b&&b.parentNode.removeChild(b)}function x(b){p.env=="development"&&typeof console!=="undefined"&&console.log("less: "+b)}function M(b,a){var d="less-error-message:"+a.replace(/[^a-z]+/ig,"-");if(!b.extract)throw b;var f=document.createElement("div"),e;f.id=d;f.className="less-error-message";f.innerHTML="<h3>"+(b.message||"There is an error in your .less file")+'</h3><p><a href="'+a+'">'+a+"</a> on line "+b.line+", column "+(b.column+1)+":</p>"+'<div>\n<pre class="ctx"><span>[-1]</span>{0}</pre>\n<pre><span>[0]</span>{current}</pre>\n<pre class="ctx"><span>[1]</span>{2}</pre>\n</div>'.replace(/\[(-?\d)\]/g,
|
||||
function(i,j){return parseInt(b.line)+parseInt(j)||""}).replace(/\{(\d)\}/g,function(i,j){return b.extract[parseInt(j)]||""}).replace(/\{current\}/,b.extract[1].slice(0,b.column)+'<span class="error">'+b.extract[1].slice(b.column)+"</span>");D(".less-error-message span {\nmargin-right: 15px;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message pre.ctx {\ncolor: #dd7777;\n}\n.less-error-message h3 {\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}",
|
||||
{title:"error-message"});f.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(p.env=="development")e=setInterval(function(){if(document.body){document.getElementById(d)?document.body.replaceChild(f,document.getElementById(d)):document.body.insertBefore(f,document.body.firstChild);clearInterval(e)}},10)}if(!Array.isArray)Array.isArray=function(b){return Object.prototype.toString.call(b)===
|
||||
"[object Array]"||b instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(b,a){for(var d=this.length>>>0,f=0;f<d;f++)f in this&&b.call(a,this[f],f,this)};if(!Array.prototype.map)Array.prototype.map=function(b,a){for(var d=this.length>>>0,f=new Array(d),e=0;e<d;e++)if(e in this)f[e]=b.call(a,this[e],e,this);return f};if(!Array.prototype.filter)Array.prototype.filter=function(b,a){for(var d=[],f=0;f<this.length;f++)b.call(a,this[f])&&d.push(this[f]);return d};if(!Array.prototype.reduce)Array.prototype.reduce=
|
||||
|
Loading…
Reference in New Issue
Block a user