npmextra/ts/npmextra.paths.ts

38 lines
858 B
TypeScript
Raw Normal View History

2023-08-03 17:22:34 +00:00
import * as plugins from './npmextra.plugins.js';
2016-07-16 23:23:22 +00:00
// directories
export let cwd = process.cwd();
2023-08-03 17:22:34 +00:00
export let packageDir = plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
'../'
);
2016-07-16 23:23:22 +00:00
2017-03-18 15:23:47 +00:00
// ----------------------
2016-09-24 19:49:53 +00:00
// keyValueStore specific
2017-03-18 15:23:47 +00:00
// ----------------------
export let home = plugins.smartpath.get.home();
2017-07-12 15:13:29 +00:00
2017-03-18 15:23:47 +00:00
/**
* keyValue base path
*/
export let kvBase = plugins.path.join(home, '.npmextra/kv');
2017-03-18 15:23:47 +00:00
/**
* the base directory for custom string based key value store
*/
export let kvCustomDir = plugins.path.join(kvBase, 'custom');
2017-03-18 15:23:47 +00:00
/**
* the subdir for git based keyValue
*/
export let kvGitDir = plugins.path.join(kvBase, 'git');
2017-03-18 15:23:47 +00:00
/**
2017-07-09 17:05:03 +00:00
* keyValue for path based keyValue store
2017-03-18 15:23:47 +00:00
*/
export let kvPathDir = plugins.path.join(kvBase, 'path');
2016-09-24 19:49:53 +00:00
2016-09-16 20:28:38 +00:00
// files
export let configFile = plugins.path.join(cwd, 'npmextra.json');