forked from BRNSystems/bosca-ceoil-js
Fix resource paths for gh-pages
This commit is contained in:
parent
178455555b
commit
3087228256
@ -35,4 +35,4 @@ Initial setup:
|
||||
Run:
|
||||
|
||||
* `npm run dev`
|
||||
* Open `http://127.0.0.1:8080/index.html` in your browser
|
||||
* Open `http://127.0.0.1:8000/index.html` in your browser
|
||||
|
14
index.html
14
index.html
@ -1,16 +1,16 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<script src="/assets/index.js"></script>
|
||||
<script src="/bosca-coeil-js/assets/index.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/assets/md-icons.css">
|
||||
<link rel="stylesheet" href="/assets/material.indigo-pink.min.css">
|
||||
<script defer src="/assets/material.min.js"></script>
|
||||
<link rel="stylesheet" href="/bosca-coeil-js/assets/md-icons.css">
|
||||
<link rel="stylesheet" href="/bosca-coeil-js/assets/material.indigo-pink.min.css">
|
||||
<script defer src="/bosca-coeil-js/assets/material.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/assets/mdl-selectfield.min.css">
|
||||
<script defer src="/assets/mdl-selectfield.min.js"></script>
|
||||
<link rel="stylesheet" href="/bosca-coeil-js/assets/mdl-selectfield.min.css">
|
||||
<script defer src="/bosca-coeil-js/assets/mdl-selectfield.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="/index.css">
|
||||
<link rel="stylesheet" href="/bosca-coeil-js/index.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
1605
package-lock.json
generated
1605
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
"compile": "tsc -p ./",
|
||||
"deploy": "node task-deploy.js",
|
||||
"dev": "concurrently npm:watch npm:webpack-dev npm:serve",
|
||||
"serve": "http-server",
|
||||
"serve": "ws --rewrite \"/bosca-coeil-js/(.*) -> /$1\"",
|
||||
"start": "node out/index.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"watch": "tsc -watch -p ./",
|
||||
@ -33,7 +33,7 @@
|
||||
"@types/tone": "git+https://github.com/Tonejs/TypeScript.git",
|
||||
"concurrently": "^4.1.1",
|
||||
"gh-pages": "^2.0.1",
|
||||
"http-server": "^0.11.1",
|
||||
"local-web-server": "^3.0.4",
|
||||
"ts-loader": "^6.0.4",
|
||||
"tslint": "^5.18.0",
|
||||
"typescript": "^3.5.2",
|
||||
|
@ -2,7 +2,11 @@ import * as tone from 'tone';
|
||||
|
||||
const notes = ["C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9"];
|
||||
|
||||
export function getSampler(instrument: string, extension: string = "flac", baseUrl: string = "audio/"): tone.Sampler {
|
||||
export function getSampler(
|
||||
instrument: string,
|
||||
extension: string = "flac",
|
||||
baseUrl: string = "/bosca-coeil-js/audio/"
|
||||
): tone.Sampler {
|
||||
let samples: { [key: string]: string } = {};
|
||||
for (const note of notes) {
|
||||
samples[note] = `${instrument}/${note.toLowerCase()}.${extension}`;
|
||||
|
@ -138,7 +138,7 @@ function setEffect(effect: string, value: number) {
|
||||
|
||||
function scheduleNote(chord: number, letter: string, index: number, length: number) {
|
||||
unscheduleNote(chord, letter, index);
|
||||
console.log(`scheduleNote(chord=${chord}, letter=${letter}, index=${index}, length=${length})`);
|
||||
// console.log(`scheduleNote(chord=${chord}, letter=${letter}, index=${index}, length=${length})`);
|
||||
patterns[chord][letter][index]["length"] = length;
|
||||
|
||||
patterns[chord][letter][index]["scheduledEvent"] = tone.Transport.schedule(
|
||||
@ -174,7 +174,7 @@ function unscheduleNote(chord: number, letter: string, index: number) {
|
||||
|
||||
function onClickNoteCell(event: MouseEvent, cell: HTMLTableCellElement, chord: number, letter: string, index: number) {
|
||||
let length = patterns[chord][letter][index]["length"];
|
||||
console.log(`onClickNoteCell(chord=${chord}, letter=${letter}, index=${index}) | length ${length}`);
|
||||
// console.log(`onClickNoteCell(chord=${chord}, letter=${letter}, index=${index}) | length ${length}`);
|
||||
|
||||
if (event.shiftKey && event.ctrlKey) {
|
||||
length = Math.max(length - 1, 0);
|
||||
|
@ -5,12 +5,15 @@ ghPages.publish(
|
||||
{
|
||||
"src": [
|
||||
"index.html",
|
||||
"index.css",
|
||||
"assets/*.css",
|
||||
"assets/*.js",
|
||||
"audio/**/*.flac",
|
||||
]
|
||||
},
|
||||
err => {
|
||||
if (err !== undefined) {
|
||||
console.log(`Failure: ${err}`);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user