Skip to content

Commit f0f12e7

Browse files
authored
New file editor (#4956)
- no mendatory external JS dependency, works in offline mode - optional external dependency is used for highlighting JSON, plain text edit is used if not available - WLED styling (dark mode only) - JSON files are displayed "prettyfied" and saved "minified" - JSON color highlighting (if available) - JSON verification during edit and on saving both in online and offline mode - special treatment for ledmap files: displayed in aligned columns (2D) or as lines (1D), saved as minified json: no more white-space problems - displays file size and total flash usage
1 parent 4612577 commit f0f12e7

File tree

8 files changed

+664
-582
lines changed

8 files changed

+664
-582
lines changed

tools/cdata.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const packageJson = require("../package.json");
2626
// Export functions for testing
2727
module.exports = { isFileNewerThan, isAnyFileInFolderNewerThan };
2828

29-
const output = ["wled00/html_ui.h", "wled00/html_pixart.h", "wled00/html_cpal.h", "wled00/html_pxmagic.h", "wled00/html_settings.h", "wled00/html_other.h"]
29+
const output = ["wled00/html_ui.h", "wled00/html_pixart.h", "wled00/html_cpal.h", "wled00/html_edit.h", "wled00/html_pxmagic.h", "wled00/html_settings.h", "wled00/html_other.h"]
3030

3131
// \x1b[34m is blue, \x1b[36m is cyan, \x1b[0m is reset
3232
const wledBanner = `
@@ -246,6 +246,21 @@ writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h", 'index');
246246
writeHtmlGzipped("wled00/data/pixart/pixart.htm", "wled00/html_pixart.h", 'pixart');
247247
//writeHtmlGzipped("wled00/data/cpal/cpal.htm", "wled00/html_cpal.h", 'cpal');
248248
writeHtmlGzipped("wled00/data/pxmagic/pxmagic.htm", "wled00/html_pxmagic.h", 'pxmagic');
249+
//writeHtmlGzipped("wled00/data/edit.htm", "wled00/html_edit.h", 'edit');
250+
251+
252+
writeChunks(
253+
"wled00/data",
254+
[
255+
{
256+
file: "edit.htm",
257+
name: "PAGE_edit",
258+
method: "gzip",
259+
filter: "html-minify"
260+
}
261+
],
262+
"wled00/html_edit.h"
263+
);
249264

250265
writeChunks(
251266
"wled00/data/cpal",

0 commit comments

Comments
 (0)