move /my-patterns to /swatch (#338)
This commit is contained in:
parent
670af8fb1b
commit
7a96436085
4 changed files with 7 additions and 4 deletions
|
|
@ -1,15 +0,0 @@
|
|||
export function getMyPatterns() {
|
||||
const my = import.meta.glob('../../../../my-patterns/**', { as: 'raw', eager: true });
|
||||
return Object.fromEntries(
|
||||
Object.entries(my) //
|
||||
.filter(([name]) => name.endsWith('.txt')) //
|
||||
.map(([name, raw]) => [name.split('/').slice(-1), raw]), //
|
||||
);
|
||||
}
|
||||
|
||||
export async function get() {
|
||||
const all = await getMyPatterns();
|
||||
return {
|
||||
body: JSON.stringify(all),
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue