mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
use process.cwd() for correct path
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
* MIT Licensed.
|
||||
*/
|
||||
exports.configFactory = function (options) {
|
||||
return Object.assign({
|
||||
return Object.assign(
|
||||
{
|
||||
port: 8080,
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||
|
||||
@@ -20,5 +21,7 @@ exports.configFactory = function (options) {
|
||||
},
|
||||
|
||||
modules: []
|
||||
}, options);
|
||||
},
|
||||
options
|
||||
);
|
||||
};
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("./default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
ipWhitelist: []
|
||||
});
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("./default.js").configFactory();
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory();
|
||||
|
||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== "undefined") {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "alert",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Sergey Morozov
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Sergey Morozov
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "clock",
|
||||
|
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "clock",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Sergey Morozov
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Johan Hammar
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
language: "es",
|
||||
timeFormat: 12,
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
language: "es",
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
language: "es",
|
||||
timeFormat: 12,
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
language: "es",
|
||||
timeFormat: 12,
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
let config = require("../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "helloworld",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "helloworld",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "helloworld",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules:
|
||||
// Using exotic content. This is why don't accept go to JSON configuration file
|
||||
(function () {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By rejas https://github.com/rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "compliments",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By fewieden https://github.com/fewieden
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By fewieden https://github.com/fewieden
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
modules: [
|
||||
{
|
||||
module: "weather",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By fewieden https://github.com/fewieden
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
units: "imperial",
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By fewieden https://github.com/fewieden
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By fewieden https://github.com/fewieden
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
timeFormat: 12,
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By rejas
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("../../default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
units: "imperial",
|
||||
|
||||
modules: [
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("./default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
ipWhitelist: ["x.x.x.x"]
|
||||
});
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("./default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
port: 8090
|
||||
});
|
||||
|
||||
|
@@ -3,9 +3,10 @@
|
||||
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||
* MIT Licensed.
|
||||
*/
|
||||
const config = require("./default.js").configFactory({
|
||||
let config = require(process.cwd() + "/tests/configs/default.js").configFactory({
|
||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.10.1"]
|
||||
});
|
||||
delete config.modules;
|
||||
|
||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||
if (typeof module !== "undefined") {
|
||||
|
Reference in New Issue
Block a user