UNPKG

642 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const log_1 = require("./log");
4const path_1 = require("./path");
5let _pkgDir;
6const init = () => _pkgDir = _pkgDir || require('pkg-dir');
7function pkgDir(fp) {
8 init();
9 const f = path_1.join(fp || process.cwd());
10 log_1.log('pkgDir', f);
11 return _pkgDir(f);
12}
13exports.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 = {}));