-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
115 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# Strudel | ||
public/assets/clockwork*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// This script is executed before the build process starts. It can be used to | ||
// do some pre-build tasks like copying files, etc. that are required for the | ||
// build process. | ||
|
||
import { existsSync, mkdirSync, readdirSync, copyFileSync } from 'fs'; | ||
import { fileURLToPath } from 'url'; | ||
import { resolve, dirname } from 'path'; | ||
|
||
// Strudel | ||
// * mkdir -p public/assets | ||
// * cp ../../node_modules/@strudel/core/dist/assets/clockworker--*.js to /public/assets/ | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
const publicAssetsDir = resolve(__dirname, '../public/assets'); | ||
const strudelAssetsDir = resolve(__dirname, '../../../node_modules/@strudel/core/dist/assets'); | ||
|
||
if (!existsSync(publicAssetsDir)) { | ||
mkdirSync(publicAssetsDir, { recursive: true }); | ||
} | ||
|
||
const files = readdirSync(strudelAssetsDir).filter(file => file.startsWith('clockworker--')); | ||
files.forEach(file => { | ||
const src = resolve(strudelAssetsDir, file); | ||
const dest = resolve(publicAssetsDir, file); | ||
copyFileSync(src, dest); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
declare module "@strudel/codemirror"; | ||
declare module "@strudel/core"; | ||
declare module "@strudel/core/controls.mjs"; | ||
declare module "@strudel/soundfonts"; | ||
declare module "@strudel/draw"; | ||
declare module "@strudel/midi"; | ||
declare module "@strudel/mini"; | ||
declare module "@strudel/osc"; | ||
declare module "@strudel/serial"; | ||
declare module "@strudel/soundfonts"; | ||
declare module "@strudel/tonal"; | ||
declare module "@strudel/transpiler"; | ||
declare module "@strudel/webaudio"; | ||
declare module "@strudel/webaudio/scheduler.mjs"; | ||
declare module "@strudel/webaudio/webaudio.mjs"; | ||
declare module "@strudel/codemirror"; |