2 * resolve-dir <https://github.com/jonschlinkert/resolve-dir>
4 * Copyright (c) 2015, Jon Schlinkert.
5 * Licensed under the MIT License.
10 var path = require('path');
11 var expand = require('expand-tilde');
12 var gm = require('global-modules');
14 module.exports = function resolveDir(dir) {
15 if (dir.charAt(0) === '~') {
18 if (dir.charAt(0) === '@') {
19 dir = path.join(gm, dir.slice(1));