npmextra/ts/npmextra.paths.ts

35 lines
795 B
TypeScript
Raw Permalink Normal View History

import * as plugins from './npmextra.plugins';
2016-07-16 23:23:22 +00:00
// directories
export let cwd = process.cwd();
export let packageDir = plugins.path.join(__dirname, '../');
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');