mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-29 14:25:25 -04:00
⚡ SvgDirectoryParser added
This commit is contained in:
parent
4d56930d8e
commit
ac296df1d7
1 changed files with 2 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
export class CursorSvgParser {
|
||||
export default class SvgDirectoryParser {
|
||||
constructor(private svgDir: string) {
|
||||
if (!fs.existsSync(this.svgDir)) {
|
||||
throw new Error(`🚨 .svg files not found in ${this.svgDir}`);
|
||||
|
@ -9,8 +9,7 @@ export class CursorSvgParser {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return all static cursors absolute paths.
|
||||
* Looking inside <svgDir>/static directory.
|
||||
* Return all static cursors absolute paths from `svgDir/static` directory.
|
||||
*/
|
||||
public getStaticCursors(): string[] {
|
||||
const cursorDir = path.resolve(this.svgDir, "static");
|
Loading…
Add table
Add a link
Reference in a new issue