mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-18 00:25:07 +00:00
776bc3135a
Co-authored-by: Valentino Hudhra <2587839+valentin0h@users.noreply.github.com>
24 lines
636 B
JavaScript
24 lines
636 B
JavaScript
import path from 'path';
|
|
import url from 'url';
|
|
|
|
/**
|
|
* Get the path to the kit, depending on the Pro or Free version.
|
|
*/
|
|
export function getKitPath() {
|
|
let source = path.dirname(
|
|
url.fileURLToPath(import.meta.resolve('@fortawesome/fontawesome-free/package.json')),
|
|
);
|
|
try {
|
|
source = path.resolve(
|
|
path.dirname(
|
|
url.fileURLToPath(import.meta.resolve('@awesome.me/kit-a463935e93/package.json')),
|
|
),
|
|
'icons',
|
|
);
|
|
} catch (error) {
|
|
console.warn('⚠️ Could not find the Pro kit, using the free kit instead');
|
|
}
|
|
|
|
return source;
|
|
}
|