mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
Minor fixes.
This commit is contained in:
@@ -12,5 +12,11 @@
|
|||||||
"browser": true,
|
"browser": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
"es6": true
|
"es6": true
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "module",
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"globalReturn": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import { danger, fail } from 'danger'
|
import { danger, fail } from "danger"
|
||||||
|
|
||||||
// Check if the CHANGELOG.md file has been edited
|
// Check if the CHANGELOG.md file has been edited
|
||||||
const changelogEdited = danger.git.modified_files.includes('CHANGELOG.md')
|
const changelogEdited = danger.git.modified_files.includes("CHANGELOG.md")
|
||||||
|
|
||||||
// Fail the build and post a comment reminding submitters to do so if it wasn't changed
|
// Fail the build and post a comment reminding submitters to do so if it wasn't changed
|
||||||
if (!changelogEdited) {
|
if (!changelogEdited) {
|
||||||
fail('Please include a CHANGELOG entry. You can find it at [CHANGELOG.md](CHANGELOG.md).')
|
fail("Please include a CHANGELOG entry. You can find it at [CHANGELOG.md](CHANGELOG.md).")
|
||||||
}
|
}
|
@@ -14,8 +14,6 @@ var path = require("path");
|
|||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var Utils = require(__dirname + "/../../js/utils.js");
|
var Utils = require(__dirname + "/../../js/utils.js");
|
||||||
|
|
||||||
if (process.env.NODE_ENV == "test") { return 0 };
|
|
||||||
|
|
||||||
/* getConfigFile()
|
/* getConfigFile()
|
||||||
* Return string with path of configuration file
|
* Return string with path of configuration file
|
||||||
* Check if set by enviroment variable MM_CONFIG_FILE
|
* Check if set by enviroment variable MM_CONFIG_FILE
|
||||||
@@ -30,6 +28,7 @@ function getConfigFile() {
|
|||||||
return configFileName;
|
return configFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkConfigFile() {
|
||||||
var configFileName = getConfigFile();
|
var configFileName = getConfigFile();
|
||||||
// Check if file is present
|
// Check if file is present
|
||||||
if (fs.existsSync(configFileName) === false) {
|
if (fs.existsSync(configFileName) === false) {
|
||||||
@@ -64,3 +63,8 @@ fs.readFile(configFileName, "utf-8", function (err, data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== "test") {
|
||||||
|
checkConfigFile();
|
||||||
|
};
|
Reference in New Issue
Block a user