UNPKG

@figma/code-connect

Version:

A tool for connecting your design system components in code with your design system in Figma

21 lines 824 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.findTsConfigPath = findTsConfigPath; const fs_1 = __importDefault(require("fs")); const find_up_1 = __importDefault(require("find-up")); const path_1 = __importDefault(require("path")); function findTsConfigPath(dir) { let tsConfigPath = undefined; find_up_1.default.sync((currentDir) => { const pathToTry = path_1.default.join(currentDir, 'tsconfig.json'); if (fs_1.default.existsSync(pathToTry)) { tsConfigPath = pathToTry; return find_up_1.default.stop; } }, { cwd: dir }); return tsConfigPath; } //# sourceMappingURL=tsconfig.js.map