Skip to content

Commit 8ce7d69

Browse files
committed
feat: export katulong helpers as methods
BREAKING CHANGE: Typically not a breaking change unless you are using katulong helpers to get the paths.
1 parent 8f054f2 commit 8ce7d69

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/paths.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
const path = require('path');
22

3-
const katulongRootPath = path.resolve('./node_modules/katulong/');
4-
const nodeModulesPath = path.resolve('./node_modules/');
5-
const pkgPath = path.resolve('.');
6-
const pkg = require(`${pkgPath}/package.json`);
7-
const binPath = path.resolve('./node_modules/.bin');
3+
const getKatulongRootPath = () => path.resolve('./node_modules/katulong/');
4+
const getNodeModulesPath = () => path.resolve('./node_modules/');
5+
const getPackagePath = () => path.resolve('.');
6+
const getBinPath = () => path.resolve('./node_modules/.bin');
87

98
module.exports = {
10-
binPath,
11-
katulongRootPath,
12-
nodeModulesPath,
13-
pkg,
14-
pkgPath
9+
getBinPath,
10+
getKatulongRootPath,
11+
getNodeModulesPath,
12+
getPackagePath
1513
};

test/.eslintrc.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module.exports = {
22
rules: {
3-
'max-nested-callbacks': 0,
4-
'no-magic-numbers': 0
3+
'max-nested-callbacks': 0
54
}
65
};

0 commit comments

Comments
 (0)