From 97a21ed32061d6f808698a81d6d663530bb9d582 Mon Sep 17 00:00:00 2001 From: Cadence Fish Date: Mon, 13 Jan 2020 01:53:34 +1300 Subject: [PATCH] Delete incorrectly copied files --- html/static/js/templates/.gitrepo | 12 ------------ html/static/js/templates/api/templates.js | 18 ------------------ html/static/js/templates/templates.js | 14 -------------- 3 files changed, 44 deletions(-) delete mode 100644 html/static/js/templates/.gitrepo delete mode 100644 html/static/js/templates/api/templates.js delete mode 100644 html/static/js/templates/templates.js diff --git a/html/static/js/templates/.gitrepo b/html/static/js/templates/.gitrepo deleted file mode 100644 index 47d5079..0000000 --- a/html/static/js/templates/.gitrepo +++ /dev/null @@ -1,12 +0,0 @@ -; DO NOT EDIT (unless you know what you are doing) -; -; This subdirectory is a git "subrepo", and this file is maintained by the -; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme -; -[subrepo] - remote = /home/cloud/Code/pinski-plugins/templates - branch = master - commit = a768add65e7eb7cfd608ef5672342940b2232b4c - parent = e684a04b0313ed5a511a9e3cc50269ebc2b64691 - method = merge - cmdver = 0.4.0 diff --git a/html/static/js/templates/api/templates.js b/html/static/js/templates/api/templates.js deleted file mode 100644 index f8df2d4..0000000 --- a/html/static/js/templates/api/templates.js +++ /dev/null @@ -1,18 +0,0 @@ -const passthrough = require("../../../../../passthrough") - -module.exports = [ - { - route: "/api/templates", methods: ["GET"], code: async () => { - const result = {} - const entries = passthrough.instance.pugCache.entries() - for (const [file, value] of entries) { - const match = file.match(/client\/.*?([^/]+)\.pug$/) - if (match) { - const name = match[1] - result[name] = value.client.toString() - } - } - return [200, result] - } - } -] diff --git a/html/static/js/templates/templates.js b/html/static/js/templates/templates.js deleted file mode 100644 index 4194aad..0000000 --- a/html/static/js/templates/templates.js +++ /dev/null @@ -1,14 +0,0 @@ -import {AsyncValueCache} from "../avc/avc.js" - -const tc = new AsyncValueCache(true, () => { - return fetch("/api/templates").then(res => res.json()).then(data => { - Object.keys(data).forEach(key => { - let fn = Function(data[key] + "; return template")() - data[key] = fn - }) - console.log(`Loaded ${Object.keys(data).length} templates`) - return data - }) -}) - -export {tc}