From 1df0c38e050f27433ece258b009098da8018a2b4 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Thu, 8 Dec 2022 16:50:31 -0500 Subject: [PATCH] Djentorator is back in a basic UI that will work but isn't very optimal. --- admin/bando/Djenterator.svelte | 191 ++++++++------------------------- api/devtools/djenterator.js | 2 +- commands/api.js | 2 +- package-lock.json | 16 +-- package.json | 1 + 5 files changed, 56 insertions(+), 156 deletions(-) diff --git a/admin/bando/Djenterator.svelte b/admin/bando/Djenterator.svelte index de290b7..8d5ca43 100644 --- a/admin/bando/Djenterator.svelte +++ b/admin/bando/Djenterator.svelte @@ -1,7 +1,8 @@ - - - - - - - - - - - - - - - - static/djenterator/{ selected_template } - -
-          
-          {results}
-          
-
-          {#if notice}
-             notice = "" }>
-              { notice }
-            
-          {/if}
-        
-
-
- + + + + + + {#if notice} + {notice} + {/if} + + {#if results} + + {/if} + + + +
diff --git a/api/devtools/djenterator.js b/api/devtools/djenterator.js index a18298e..25da6e5 100644 --- a/api/devtools/djenterator.js +++ b/api/devtools/djenterator.js @@ -10,7 +10,7 @@ export const get = async (req, res) => { const api = new API(req, res); if(process.env.DANGER_ADMIN) { - const files = glob.sync("./static/djenterator/**/!(*.vars)"); + const files = glob.sync("./static/djenterator/!(*.vars|*.swp)"); return api.reply(200, files.map(f => path.basename(f))); } else { return api.error(404, "Not Found"); diff --git a/commands/api.js b/commands/api.js index aecba0e..df16e38 100644 --- a/commands/api.js +++ b/commands/api.js @@ -220,7 +220,7 @@ export const main = async (opts) => { if(opts.DANGER_ADMIN) { log.warn("!!!!!! Exposing client/bando/demos to the network because you set DANGER_ADMIN."); - app.use("/bando/demos/", express.static("client/bando/demos")); + app.use("/bando/demos/", express.static("admin/bando/demos")); } await dynamic_load("./api/**/[A-Za-z]*.js", (file_name, route, func_name) => { diff --git a/package-lock.json b/package-lock.json index 7232f9d..6d09c62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "learnjsthehardway.com", - "version": "0.5.0", + "name": "bandolier-template", + "version": "0.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "learnjsthehardway.com", - "version": "0.5.0", + "name": "bandolier-template", + "version": "0.6.0", "dependencies": { "@cloudfour/simple-svg-placeholder": "^1.0.2", "@jamcart/7ty": "^0.1.6", @@ -88,6 +88,7 @@ "istanbul-lib-coverage": "^3.0.2", "istanbul-lib-report": "^3.0.0", "istanbul-reports": "^3.0.5", + "lodash": "^4.17.21", "neat-csv": "^7.0.0", "normalize-path": "^3.0.0", "npm-run-all": "^4.1.5", @@ -8274,7 +8275,8 @@ }, "node_modules/lodash": { "version": "4.17.21", - "license": "MIT" + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.clonedeep": { "version": "4.5.0", @@ -21002,7 +21004,9 @@ } }, "lodash": { - "version": "4.17.21" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.clonedeep": { "version": "4.5.0", diff --git a/package.json b/package.json index 13f1186..1f2f4cb 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "istanbul-lib-coverage": "^3.0.2", "istanbul-lib-report": "^3.0.0", "istanbul-reports": "^3.0.5", + "lodash": "^4.17.21", "neat-csv": "^7.0.0", "normalize-path": "^3.0.0", "npm-run-all": "^4.1.5",