mirror of
https://github.com/wled/WLED.git
synced 2025-11-09 11:09:10 +00:00
Automatically test cdata.js
This commit is contained in:
@@ -233,6 +233,7 @@ function isAnyFileInFolderNewerThan(folderPath, time) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the web UI is already built
|
||||
function isAlreadyBuilt(folderPath) {
|
||||
let lastBuildTime = Infinity;
|
||||
|
||||
@@ -248,6 +249,11 @@ function isAlreadyBuilt(folderPath) {
|
||||
return !isAnyFileInFolderNewerThan(folderPath, lastBuildTime);
|
||||
}
|
||||
|
||||
// Don't run this script if we're in a test environment
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isAlreadyBuilt("wled00/data") && process.argv[2] !== '--force' && process.argv[2] !== '-f') {
|
||||
console.info("Web UI is already built");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user