add sampler script + samples folder with README
This commit is contained in:
parent
abe775c3fd
commit
8f355dcf96
7 changed files with 10 additions and 50 deletions
2
packages/sampler/.gitignore
vendored
Normal file
2
packages/sampler/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
samples/*
|
||||
!samples/README.md
|
||||
|
|
@ -42,7 +42,7 @@ async function getBanks(directory) {
|
|||
banks[bank].push(url);
|
||||
return url;
|
||||
});
|
||||
banks._base = `http:localhost:5432`;
|
||||
banks._base = `http://localhost:5432`;
|
||||
return { banks, files };
|
||||
}
|
||||
|
||||
|
|
|
|||
5
packages/sampler/samples/README.md
Normal file
5
packages/sampler/samples/README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# samples folder
|
||||
|
||||
1. copy any samples to this folder
|
||||
2. run `npm run sampler`
|
||||
3. add `samples('local:')` to your code
|
||||
|
|
@ -195,7 +195,7 @@ export const samples = async (sampleMap, baseUrl = sampleMap._base || '', option
|
|||
sampleMap = githubPath(sampleMap, 'strudel.json');
|
||||
}
|
||||
if (sampleMap.startsWith('local:')) {
|
||||
sampleMap = `/strudel.json`;
|
||||
sampleMap = `http://localhost:5432`;
|
||||
}
|
||||
if (sampleMap.startsWith('shabda:')) {
|
||||
let [_, path] = sampleMap.split('shabda:');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue