mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-16 23:33:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
30
node_modules/app-root-path/lib/app-root-path.js
generated
vendored
Normal file
30
node_modules/app-root-path/lib/app-root-path.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(dirname) {
|
||||
var path = require('path');
|
||||
var resolve = require('./resolve.js');
|
||||
var appRootPath = resolve(dirname);
|
||||
|
||||
var publicInterface = {
|
||||
resolve: function(pathToModule) {
|
||||
return path.join(appRootPath, pathToModule);
|
||||
},
|
||||
|
||||
require: function(pathToModule) {
|
||||
return require(publicInterface.resolve(pathToModule));
|
||||
},
|
||||
|
||||
toString: function() {
|
||||
return appRootPath;
|
||||
},
|
||||
|
||||
setPath: function(explicitlySetPath) {
|
||||
appRootPath = path.resolve(explicitlySetPath);
|
||||
publicInterface.path = appRootPath;
|
||||
},
|
||||
|
||||
path: appRootPath
|
||||
};
|
||||
|
||||
return publicInterface;
|
||||
};
|
||||
Reference in New Issue
Block a user