mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
Minor fixes.
This commit is contained in:
parent
29fc7910b7
commit
e2dbe8a0a2
@ -12,5 +12,11 @@
|
||||
"browser": true,
|
||||
"node": 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
|
||||
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
|
||||
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 Utils = require(__dirname + "/../../js/utils.js");
|
||||
|
||||
if (process.env.NODE_ENV == "test") { return 0 };
|
||||
|
||||
/* getConfigFile()
|
||||
* Return string with path of configuration file
|
||||
* Check if set by enviroment variable MM_CONFIG_FILE
|
||||
@ -30,6 +28,7 @@ function getConfigFile() {
|
||||
return configFileName;
|
||||
}
|
||||
|
||||
function checkConfigFile() {
|
||||
var configFileName = getConfigFile();
|
||||
// Check if file is present
|
||||
if (fs.existsSync(configFileName) === false) {
|
||||
@ -64,3 +63,8 @@ fs.readFile(configFileName, "utf-8", function (err, data) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== "test") {
|
||||
checkConfigFile();
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user