bs-compile-middleware
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -47,7 +47,14 @@ 'use strict'; | ||
if (error) { | ||
console.error(error); | ||
res.end(formatError(error)); | ||
return next(true); | ||
} | ||
res.end(compiler.compile(data, srcPath)); | ||
var out = void 0; | ||
try { | ||
out = compiler.compile(data, srcPath); | ||
} catch (error) { | ||
out = formatError(error); | ||
} | ||
res.end(out); | ||
next(true); | ||
@@ -77,2 +84,6 @@ }); | ||
}); | ||
} | ||
function formatError(error) { | ||
return error.stack; | ||
} |
{ | ||
"name": "bs-compile-middleware", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": "katashin", | ||
@@ -25,2 +25,3 @@ "description": "Compilation middleware for Browsersync", | ||
"clean": "rimraf -rf lib", | ||
"dev": "npm run test:unit -- -w", | ||
"build": "babel src --out-dir lib", | ||
@@ -27,0 +28,0 @@ "build:prod": "cross-env NODE_ENV=production npm run build", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4789
64