mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-30 06:45:31 -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 fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
export class CursorSvgParser {
|
export default class SvgDirectoryParser {
|
||||||
constructor(private svgDir: string) {
|
constructor(private svgDir: string) {
|
||||||
if (!fs.existsSync(this.svgDir)) {
|
if (!fs.existsSync(this.svgDir)) {
|
||||||
throw new Error(`🚨 .svg files not found in ${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.
|
* Return all static cursors absolute paths from `svgDir/static` directory.
|
||||||
* Looking inside <svgDir>/static directory.
|
|
||||||
*/
|
*/
|
||||||
public getStaticCursors(): string[] {
|
public getStaticCursors(): string[] {
|
||||||
const cursorDir = path.resolve(this.svgDir, "static");
|
const cursorDir = path.resolve(this.svgDir, "static");
|
Loading…
Add table
Add a link
Reference in a new issue