Skip to content

Commit

Permalink
feat: export katulong helpers as methods
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Typically not a breaking change unless you are using katulong helpers to get the paths.
  • Loading branch information
rodoabad committed Mar 11, 2017
1 parent 8f054f2 commit 8ce7d69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 8 additions & 10 deletions src/paths.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
const path = require('path');

const katulongRootPath = path.resolve('./node_modules/katulong/');
const nodeModulesPath = path.resolve('./node_modules/');
const pkgPath = path.resolve('.');
const pkg = require(`${pkgPath}/package.json`);
const binPath = path.resolve('./node_modules/.bin');
const getKatulongRootPath = () => path.resolve('./node_modules/katulong/');
const getNodeModulesPath = () => path.resolve('./node_modules/');
const getPackagePath = () => path.resolve('.');
const getBinPath = () => path.resolve('./node_modules/.bin');

module.exports = {
binPath,
katulongRootPath,
nodeModulesPath,
pkg,
pkgPath
getBinPath,
getKatulongRootPath,
getNodeModulesPath,
getPackagePath
};
3 changes: 1 addition & 2 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
rules: {
'max-nested-callbacks': 0,
'no-magic-numbers': 0
'max-nested-callbacks': 0
}
};

0 comments on commit 8ce7d69

Please sign in to comment.