mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
global: Add the root_path variable in global.
This will can be help for work the better way in use the path into the core and modules.
This commit is contained in:
parent
4237d0c7e3
commit
f58e758a41
@ -34,6 +34,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Added abilty set the classes option to compliments module for style and text size of compliments.
|
- Added abilty set the classes option to compliments module for style and text size of compliments.
|
||||||
- Added ability to configure electronOptions
|
- Added ability to configure electronOptions
|
||||||
- Calendar module: option to hide private events
|
- Calendar module: option to hide private events
|
||||||
|
- Add root_path for global vars
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
- Modified translations for Frysk.
|
- Modified translations for Frysk.
|
||||||
|
@ -14,6 +14,9 @@ var path = require("path");
|
|||||||
global.version = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
|
global.version = JSON.parse(fs.readFileSync("package.json", "utf8")).version;
|
||||||
console.log("Starting MagicMirror: v" + global.version);
|
console.log("Starting MagicMirror: v" + global.version);
|
||||||
|
|
||||||
|
// global absolute root path
|
||||||
|
global.root_path = path.resolve(__dirname + "/../");
|
||||||
|
|
||||||
// The next part is here to prevent a major exception when there
|
// The next part is here to prevent a major exception when there
|
||||||
// is no internet connection. This could probable be solved better.
|
// is no internet connection. This could probable be solved better.
|
||||||
process.on("uncaughtException", function (err) {
|
process.on("uncaughtException", function (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user