diff --git a/.gitignore b/.gitignore index df2fc162..7fcf9d28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ dist +out !docs/dist dist-* cabal-dev diff --git a/package.json b/package.json index 945ae088..4ff5bf04 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "setup": "npm i && npm run bootstrap && cd repl && npm i", "repl": "cd repl && npm run dev", "osc": "cd packages/osc && npm run server", - "build": "cd repl && npm run build", + "build": "cd repl && npm run build && cd ../tutorial && npm run build", + "preview": "npx serve ./out", "jsdoc": "jsdoc packages/ -c jsdoc.config.json", "jsdoc-json": "jsdoc packages/ --template ./node_modules/jsdoc-json --destination doc.json -c jsdoc.config.json" }, diff --git a/packages/tone/draw.mjs b/packages/tone/draw.mjs index 4fd3ea9e..d894c547 100644 --- a/packages/tone/draw.mjs +++ b/packages/tone/draw.mjs @@ -37,6 +37,7 @@ Pattern.prototype.draw = function (callback, cycleSpan, lookaheadCycles = 1) { const end = (currentCycle + lookaheadCycles) * cycleSpan; events = this._asNumber(true) // true = silent error .query(new State(new TimeSpan(begin, end))) + .filter(Boolean) .filter((event) => event.part.begin.equals(event.whole.begin)); } } diff --git a/repl/vite.config.js b/repl/vite.config.js index 627a3196..8d83055e 100644 --- a/repl/vite.config.js +++ b/repl/vite.config.js @@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + build: { + outDir: '../out', + }, }); diff --git a/tutorial/vite.config.js b/tutorial/vite.config.js index 67e17b94..48c0dc0a 100644 --- a/tutorial/vite.config.js +++ b/tutorial/vite.config.js @@ -14,8 +14,12 @@ const options = { // https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), mdx(options)], + build: { + outDir: '../out/tutorial', + }, + base: '/tutorial/', }); // jsxRuntime:'classic' to prevent "jsxDevRuntime.exports.jsxDEV is not a function" for dev mode // mode: 'development', -// react({ jsxRuntime: 'classic' }), \ No newline at end of file +// react({ jsxRuntime: 'classic' }),