mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-29 09:14:59 +00:00
Merge branch 'develop' into feature/automated-weather-tests
# Conflicts: # modules/default/weather/weather.js # package-lock.json # package.json
This commit is contained in:
@@ -16,7 +16,7 @@ var Utils = require(__dirname + "/../../js/utils.js");
|
||||
|
||||
/* getConfigFile()
|
||||
* Return string with path of configuration file
|
||||
* Check if set by enviroment variable MM_CONFIG_FILE
|
||||
* Check if set by environment variable MM_CONFIG_FILE
|
||||
*/
|
||||
function getConfigFile() {
|
||||
// FIXME: This function should be in core. Do you want refactor me ;) ?, be good!
|
||||
@@ -35,7 +35,7 @@ function checkConfigFile() {
|
||||
console.error(Utils.colors.error("File not found: "), configFileName);
|
||||
return;
|
||||
}
|
||||
// check permision
|
||||
// check permission
|
||||
try {
|
||||
fs.accessSync(configFileName, fs.F_OK);
|
||||
} catch (e) {
|
||||
@@ -52,12 +52,12 @@ function checkConfigFile() {
|
||||
if (err) { throw err; }
|
||||
v.JSHINT(data); // Parser by jshint
|
||||
|
||||
if (v.JSHINT.errors.length == 0) {
|
||||
if (v.JSHINT.errors.length === 0) {
|
||||
console.log("Your configuration file doesn't contain syntax errors :)");
|
||||
return true;
|
||||
} else {
|
||||
errors = v.JSHINT.data().errors;
|
||||
for (idx in errors) {
|
||||
for (var idx in errors) {
|
||||
error = errors[idx];
|
||||
console.log("Line", error.line, "col", error.character, error.reason);
|
||||
}
|
||||
@@ -67,4 +67,4 @@ function checkConfigFile() {
|
||||
|
||||
if (process.env.NODE_ENV !== "test") {
|
||||
checkConfigFile();
|
||||
};
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Magic Mirror Test config sample enviroment
|
||||
/* Magic Mirror Test config sample environment
|
||||
*
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
|
@@ -6,7 +6,6 @@
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
|
||||
var config = {
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Magic Mirror Test config sample enviroment set por 8090
|
||||
/* Magic Mirror Test config sample environment set port 8090
|
||||
*
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
|
Reference in New Issue
Block a user