browser-sync
Advanced tools
Comparing version 3.0.0-alpha.1 to 3.0.0-alpha.2
@@ -197,2 +197,5 @@ "use strict"; | ||
if (err) { | ||
if (err.code === "MODULE_NOT_FOUND") { | ||
return utils.fail(true, err, bs.cb); | ||
} | ||
return done(err); | ||
@@ -199,0 +202,0 @@ } |
@@ -9,2 +9,14 @@ "use strict"; | ||
module.exports = function (bs, cb) { | ||
var localtunnel; | ||
try { | ||
localtunnel = require("localtunnel"); | ||
} | ||
catch (e) { | ||
if (e.code === "MODULE_NOT_FOUND") { | ||
var error = new Error("Could not find package `localtunnel`. From Browsersync version 3.0 you'll need to install this manually."); | ||
error.code = e.code; | ||
return cb(error); | ||
} | ||
return cb(e); | ||
} | ||
var opts = {}; | ||
@@ -18,3 +30,3 @@ var options = bs.options; | ||
bs.debug("Requesting a tunnel connection with options: {magenta:%s}", utils.inspect(opts)); | ||
require("localtunnel")(port, opts, function (err, tunnel) { | ||
localtunnel(port, opts, function (err, tunnel) { | ||
if (err) { | ||
@@ -21,0 +33,0 @@ return cb(err); |
{ | ||
"name": "browser-sync", | ||
"description": "Live CSS Reload & Browser Syncing", | ||
"version": "3.0.0-alpha.1", | ||
"version": "3.0.0-alpha.2", | ||
"homepage": "https://browsersync.io/", | ||
@@ -38,4 +38,4 @@ "author": { | ||
"dependencies": { | ||
"browser-sync-client": "^3.0.0-alpha.1", | ||
"browser-sync-ui": "^3.0.0-alpha.1", | ||
"browser-sync-client": "^3.0.0-alpha.2", | ||
"browser-sync-ui": "^3.0.0-alpha.2", | ||
"bs-recipes": "1.3.4", | ||
@@ -89,10 +89,2 @@ "chalk": "4.1.2", | ||
}, | ||
"optionalDependencies": { | ||
"localtunnel": "^2.0.2" | ||
}, | ||
"peerDependenciesMeta": { | ||
"localtunnel": { | ||
"optional": true | ||
} | ||
}, | ||
"keywords": [ | ||
@@ -104,3 +96,3 @@ "browser sync", | ||
], | ||
"gitHead": "2e8dd31c35a432507596a75a52444fb5952c65d1" | ||
"gitHead": "5d5e665f812642fd8363e44356aa9402cbfd481c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
629122
28
11889
- Removedaxios@0.21.4(transitive)
- Removedcliui@7.0.4(transitive)
- Removeddebug@4.3.2(transitive)
- Removedlocaltunnel@2.0.2(transitive)
- Removedopenurl@1.1.1(transitive)
- Removedyargs@17.1.1(transitive)
- Removedyargs-parser@20.2.9(transitive)