@soundworks/core
Advanced tools
Comparing version 3.4.0 to 3.5.0
{ | ||
"name": "@soundworks/core", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "full-stack javascript framework for distributed audio visual experiences on the web", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -241,3 +241,4 @@ "use strict"; | ||
useHttps: false, | ||
crossOriginIsolated: true | ||
crossOriginIsolated: true, | ||
verbose: true | ||
}, | ||
@@ -248,3 +249,5 @@ app: { | ||
}; | ||
this.config = (0, _lodash.default)({}, defaultConfig, config); // @note: do not remove | ||
this.config = (0, _lodash.default)({}, defaultConfig, config); | ||
_logger.default.configure(this.config.env.verbose); // @note: do not remove | ||
// backward compatibility w/ assetsDomain and `soundworks-template` | ||
@@ -260,2 +263,3 @@ // cf. https://github.com/collective-soundworks/soundworks/issues/35 | ||
if (!this.config.env.assetsDomain && this.config.env.subpath !== undefined) { | ||
@@ -262,0 +266,0 @@ const subpath = this.config.env.subpath.replace(/^\//, '').replace(/\/$/, ''); |
@@ -18,3 +18,13 @@ "use strict"; | ||
const logger = { | ||
verbose: true, | ||
configure(verbose) { | ||
this.verbose = verbose; | ||
}, | ||
title(msg) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
console.log(_chalk.default.cyan(`+ ${msg}`)); | ||
@@ -24,2 +34,6 @@ }, | ||
clientConfigAndRouting(routes, config) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
const clientsConfig = config.app.clients; | ||
@@ -81,2 +95,6 @@ const serverIp = config.env.serverIp; | ||
ip(protocol, address, port) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
console.log(` ${protocol}://${address}:${_chalk.default.green(port)}`); | ||
@@ -86,2 +104,6 @@ }, | ||
pluginStart(name) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
console.log(` ${name} ${_chalk.default.yellow('start...')}`); | ||
@@ -91,2 +113,6 @@ }, | ||
pluginStarted(name) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
console.log(` ${name} ${_chalk.default.cyan('started')}`); | ||
@@ -96,2 +122,6 @@ }, | ||
pluginReady(name) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
console.log(` ${name} ${_chalk.default.green('ready')}`); | ||
@@ -101,2 +131,6 @@ }, | ||
pluginErrored(name) { | ||
if (!this.verbose) { | ||
return; | ||
} | ||
console.log(` ${name} ${_chalk.default.red('errors')}`); | ||
@@ -103,0 +137,0 @@ } |
172030
4268