new build script + fix draw

This commit is contained in:
Felix Roos 2022-05-17 22:45:23 +02:00
parent ed35f967b0
commit 806c8925c9
5 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
dist
out
!docs/dist
dist-*
cabal-dev

View File

@ -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"
},

View File

@ -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));
}
}

View File

@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
build: {
outDir: '../out',
},
});

View File

@ -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' }),
// react({ jsxRuntime: 'classic' }),