mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 07:35:16 +00:00
22 lines
550 B
JavaScript
22 lines
550 B
JavaScript
import path from 'node:path';
|
|
import url from 'node: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('@gitbook/fontawesome-pro/package.json'))
|
|
),
|
|
'icons'
|
|
);
|
|
} catch (_error) {}
|
|
|
|
return source;
|
|
}
|