Plugins in data/plugins are loaded at startup and can add a tab with a read-only node board, and the demo plugin shows every asset as a node (#113)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2a390e52ff
commit
57a97ba94f
22 files changed
+1153
-57
No files matched your search
@@ -6,6 +6,8 @@
|
||||
*
|
||||
* Usage: node tools/seed-e2e.mjs [projectId] [baseUrl]
|
||||
*/
|
||||
import { copyFileSync, mkdirSync, readdirSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { sineWav } from './lib/audio.mjs';
|
||||
import { edge, node, port, sceneObject, variable } from './lib/builders.mjs';
|
||||
import { PROJECTS, cliArgs, uploadFont, uploadSound, writeProject } from './lib/projects.mjs';
|
||||
@@ -13,6 +15,16 @@ import { adjustColorsShader } from './lib/shaders.mjs';
|
||||
|
||||
const { projectId, baseUrl } = cliArgs('seed-e2e.mjs', PROJECTS.fixture);
|
||||
|
||||
/**
|
||||
* The plugins that ship with the repository, where the editor loads them from – the build does the
|
||||
* same, this makes a run after a plain checkout independent of it. The server is this checkout
|
||||
* (locally and in CI), so a file copy is enough.
|
||||
*/
|
||||
const ROOT = fileURLToPath(new URL('..', import.meta.url));
|
||||
mkdirSync(`${ROOT}data/plugins`, { recursive: true });
|
||||
for (const file of readdirSync(`${ROOT}plugins`).filter((f) => f.endsWith('.js')))
|
||||
copyFileSync(`${ROOT}plugins/${file}`, `${ROOT}data/plugins/${file}`);
|
||||
|
||||
/**
|
||||
* Two typefaces for the font step to pick and to drop. They are put on the server but not made
|
||||
* into assets: the step is about the picker and the drop making them. The files come from the
|
||||
|
||||
Reference in new issue
Block a user