new build script + fix draw
This commit is contained in:
parent
ed35f967b0
commit
806c8925c9
5 changed files with 12 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
dist
|
dist
|
||||||
|
out
|
||||||
!docs/dist
|
!docs/dist
|
||||||
dist-*
|
dist-*
|
||||||
cabal-dev
|
cabal-dev
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
"setup": "npm i && npm run bootstrap && cd repl && npm i",
|
"setup": "npm i && npm run bootstrap && cd repl && npm i",
|
||||||
"repl": "cd repl && npm run dev",
|
"repl": "cd repl && npm run dev",
|
||||||
"osc": "cd packages/osc && npm run server",
|
"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": "jsdoc packages/ -c jsdoc.config.json",
|
||||||
"jsdoc-json": "jsdoc packages/ --template ./node_modules/jsdoc-json --destination doc.json -c jsdoc.config.json"
|
"jsdoc-json": "jsdoc packages/ --template ./node_modules/jsdoc-json --destination doc.json -c jsdoc.config.json"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ Pattern.prototype.draw = function (callback, cycleSpan, lookaheadCycles = 1) {
|
||||||
const end = (currentCycle + lookaheadCycles) * cycleSpan;
|
const end = (currentCycle + lookaheadCycles) * cycleSpan;
|
||||||
events = this._asNumber(true) // true = silent error
|
events = this._asNumber(true) // true = silent error
|
||||||
.query(new State(new TimeSpan(begin, end)))
|
.query(new State(new TimeSpan(begin, end)))
|
||||||
|
.filter(Boolean)
|
||||||
.filter((event) => event.part.begin.equals(event.whole.begin));
|
.filter((event) => event.part.begin.equals(event.whole.begin));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,7 @@ import react from '@vitejs/plugin-react';
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
|
build: {
|
||||||
|
outDir: '../out',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,10 @@ const options = {
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react(), mdx(options)],
|
plugins: [react(), mdx(options)],
|
||||||
|
build: {
|
||||||
|
outDir: '../out/tutorial',
|
||||||
|
},
|
||||||
|
base: '/tutorial/',
|
||||||
});
|
});
|
||||||
|
|
||||||
// jsxRuntime:'classic' to prevent "jsxDevRuntime.exports.jsxDEV is not a function" for dev mode
|
// jsxRuntime:'classic' to prevent "jsxDevRuntime.exports.jsxDEV is not a function" for dev mode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue