update
This commit is contained in:
+12
-8
@@ -247,18 +247,22 @@ function pug_rethrow(err, filename, lineno, str) {
|
||||
err.message += ' on line ' + lineno;
|
||||
throw err;
|
||||
}
|
||||
var context, lines, start, end;
|
||||
try {
|
||||
str = str || require('fs').readFileSync(filename, 'utf8');
|
||||
} catch (ex) {
|
||||
pug_rethrow(err, null, lineno);
|
||||
}
|
||||
var context = 3,
|
||||
lines = str.split('\n'),
|
||||
start = Math.max(lineno - context, 0),
|
||||
str = str || require('fs').readFileSync(filename, {encoding: 'utf8'});
|
||||
context = 3;
|
||||
lines = str.split('\n');
|
||||
start = Math.max(lineno - context, 0);
|
||||
end = Math.min(lines.length, lineno + context);
|
||||
} catch (ex) {
|
||||
err.message +=
|
||||
' - could not read from ' + filename + ' (' + ex.message + ')';
|
||||
pug_rethrow(err, null, lineno);
|
||||
return;
|
||||
}
|
||||
|
||||
// Error context
|
||||
var context = lines
|
||||
context = lines
|
||||
.slice(start, end)
|
||||
.map(function(line, i) {
|
||||
var curr = i + start + 1;
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@ module.exports = {
|
||||
"attrs": "function pug_attrs(t,r){var a=\"\";for(var s in t)if(pug_has_own_property.call(t,s)){var u=t[s];if(\"class\"===s){u=pug_classes(u),a=pug_attr(s,u,!1,r)+a;continue}\"style\"===s&&(u=pug_style(u)),a+=pug_attr(s,u,!1,r)}return a}",
|
||||
"match_html": "var pug_match_html=/[\"&<>]/;",
|
||||
"escape": "function pug_escape(e){var a=\"\"+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s=\"\";for(r=t.index,c=0;r<a.length;r++){switch(a.charCodeAt(r)){case 34:n=\""\";break;case 38:n=\"&\";break;case 60:n=\"<\";break;case 62:n=\">\";break;default:continue}c!==r&&(s+=a.substring(c,r)),c=r+1,s+=n}return c!==r?s+a.substring(c,r):s}",
|
||||
"rethrow": "function pug_rethrow(n,e,t,r){if(!(n instanceof Error))throw n;if(!(\"undefined\"==typeof window&&e||r))throw n.message+=\" on line \"+t,n;try{r=r||require(\"fs\").readFileSync(e,\"utf8\")}catch(e){pug_rethrow(n,null,t)}var a=3,i=r.split(\"\\n\"),o=Math.max(t-a,0),h=Math.min(i.length,t+a),a=i.slice(o,h).map(function(n,e){var r=e+o+1;return(r==t?\" > \":\" \")+r+\"| \"+n}).join(\"\\n\");n.path=e;try{n.message=(e||\"Pug\")+\":\"+t+\"\\n\"+a+\"\\n\\n\"+n.message}catch(n){}throw n}"
|
||||
"rethrow": "function pug_rethrow(e,n,r,t){if(!(e instanceof Error))throw e;if(!(\"undefined\"==typeof window&&n||t))throw e.message+=\" on line \"+r,e;var o,a,i,s;try{t=t||require(\"fs\").readFileSync(n,{encoding:\"utf8\"}),o=3,a=t.split(\"\\n\"),i=Math.max(r-o,0),s=Math.min(a.length,r+o)}catch(t){return e.message+=\" - could not read from \"+n+\" (\"+t.message+\")\",void pug_rethrow(e,null,r)}o=a.slice(i,s).map(function(e,n){var t=n+i+1;return(t==r?\" > \":\" \")+t+\"| \"+e}).join(\"\\n\"),e.path=n;try{e.message=(n||\"Pug\")+\":\"+r+\"\\n\"+o+\"\\n\\n\"+e.message}catch(e){}throw e}"
|
||||
}
|
||||
|
||||
+12
-12
@@ -1,35 +1,35 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"pug-runtime@3.0.0",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"pug-runtime@3.0.1",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "pug-runtime@3.0.0",
|
||||
"_id": "pug-runtime@3.0.0",
|
||||
"_from": "pug-runtime@3.0.1",
|
||||
"_id": "pug-runtime@3.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-GoEPcmQNnaTsePEdVA05bDpY+Op5VLHKayg08AQiqJBWU/yIaywEYv7TetC5dEQS3fzBBoyb2InDcZEg3mPTIA==",
|
||||
"_integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg==",
|
||||
"_location": "/pug-runtime",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "pug-runtime@3.0.0",
|
||||
"raw": "pug-runtime@3.0.1",
|
||||
"name": "pug-runtime",
|
||||
"escapedName": "pug-runtime",
|
||||
"rawSpec": "3.0.0",
|
||||
"rawSpec": "3.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.0.0"
|
||||
"fetchSpec": "3.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/pug",
|
||||
"/pug-attrs",
|
||||
"/pug-code-gen"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.0.tgz",
|
||||
"_spec": "3.0.0",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz",
|
||||
"_spec": "3.0.1",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "ForbesLindesay"
|
||||
},
|
||||
@@ -62,5 +62,5 @@
|
||||
"prepublish": "node prepublish",
|
||||
"pretest": "npm run prepublish"
|
||||
},
|
||||
"version": "3.0.0"
|
||||
"version": "3.0.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user