1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const log_1 = require("./log");
|
4 | const path_1 = require("./path");
|
5 | let _pkgDir;
|
6 | const init = () => _pkgDir = _pkgDir || require('pkg-dir');
|
7 | function pkgDir(fp) {
|
8 | init();
|
9 | const f = path_1.join(fp || process.cwd());
|
10 | log_1.log('pkgDir', f);
|
11 | return _pkgDir(f);
|
12 | }
|
13 | exports.pkgDir = pkgDir;
|
14 | (function (pkgDir) {
|
15 | function sync(fp) {
|
16 | init();
|
17 | const f = path_1.join(fp || process.cwd());
|
18 | log_1.log('pkgDir.sync', f);
|
19 | return _pkgDir.sync(f);
|
20 | }
|
21 | pkgDir.sync = sync;
|
22 | })(pkgDir = exports.pkgDir || (exports.pkgDir = {}));
|