From a5af6d5f4c5b884f4041513750fb5bf7df021945 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 29 Dec 2023 15:07:53 +0100 Subject: [PATCH] remove gist function --- dependencies.svg | 15 --------------- packages/core/gist.js | 12 ------------ packages/core/index.mjs | 1 - undocumented.json | 1 - 4 files changed, 29 deletions(-) delete mode 100644 packages/core/gist.js diff --git a/dependencies.svg b/dependencies.svg index 2d2fc61d..1fb763fd 100644 --- a/dependencies.svg +++ b/dependencies.svg @@ -322,15 +322,6 @@ - - -packages/core/gist.js - - -gist.js - - - packages/core/index.mjs @@ -376,12 +367,6 @@ - - -packages/core/index.mjs->packages/core/gist.js - - - packages/core/index.mjs->packages/core/hap.mjs diff --git a/packages/core/gist.js b/packages/core/gist.js deleted file mode 100644 index 9df2dda2..00000000 --- a/packages/core/gist.js +++ /dev/null @@ -1,12 +0,0 @@ -/* -gist.js - -Copyright (C) 2022 Strudel contributors - see -This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . -*/ - -// this is a shortcut to eval code from a gist -// why? to be able to shorten strudel code + e.g. be able to change instruments after links have been generated -export default (route, cache = true) => - fetch(`https://gist.githubusercontent.com/${route}?cachebust=${cache ? '' : Date.now()}`) - .then((res) => res.text()) - .then((code) => eval(code)); diff --git a/packages/core/index.mjs b/packages/core/index.mjs index bed63f9a..f4598f11 100644 --- a/packages/core/index.mjs +++ b/packages/core/index.mjs @@ -27,7 +27,6 @@ export * from './pianoroll.mjs'; export * from './spiral.mjs'; export * from './ui.mjs'; export { default as drawLine } from './drawLine.mjs'; -export { default as gist } from './gist.js'; // below won't work with runtime.mjs (json import fails) /* import * as p from './package.json'; export const version = p.version; */ diff --git a/undocumented.json b/undocumented.json index 0a807c90..8a5641ad 100644 --- a/undocumented.json +++ b/undocumented.json @@ -178,7 +178,6 @@ "backgroundImage", "cleanupUi" ], - "/packages/core/gist.js": [], "/packages/core/index.mjs": [], "/packages/csound/index.mjs": [ "loadCSound",