mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-16 15:23:47 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
15
node_modules/find-parent-dir/.npmignore
generated
vendored
Normal file
15
node_modules/find-parent-dir/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
lib-cov
|
||||
*.seed
|
||||
*.log
|
||||
*.csv
|
||||
*.dat
|
||||
*.out
|
||||
*.pid
|
||||
*.gz
|
||||
|
||||
pids
|
||||
logs
|
||||
results
|
||||
|
||||
npm-debug.log
|
||||
node_modules
|
||||
4
node_modules/find-parent-dir/.travis.yml
generated
vendored
Normal file
4
node_modules/find-parent-dir/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
23
node_modules/find-parent-dir/LICENSE
generated
vendored
Normal file
23
node_modules/find-parent-dir/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
Copyright 2013 Thorsten Lorenz.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
27
node_modules/find-parent-dir/README.md
generated
vendored
Normal file
27
node_modules/find-parent-dir/README.md
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# find-parent-dir [](http://travis-ci.org/thlorenz/find-parent-dir)
|
||||
|
||||
Finds the first parent directory that contains a given file or directory.
|
||||
|
||||
npm install find-parent-dir
|
||||
|
||||
```js
|
||||
// assuming this is called from a file in a subdirectory of /myprojects/foo which contains .git directory
|
||||
var findParentDir = require('find-parent-dir');
|
||||
|
||||
findParentDir(__dirname, '.git', function (err, dir) {
|
||||
// has err if some file access error occurred
|
||||
console.log(dir); // => /myprojects/foo/
|
||||
|
||||
// if parent dir wasn't found, dir is null
|
||||
})
|
||||
|
||||
// Same using `sync` method
|
||||
var dir;
|
||||
try {
|
||||
dir = findParentDir.sync(__dirname, '.git');
|
||||
console.log(dir); // => /myprojects/foo/
|
||||
// if parent dir wasn't found, dir is null
|
||||
} catch(err) {
|
||||
console.error('error', err);
|
||||
}
|
||||
```
|
||||
7
node_modules/find-parent-dir/example/git-repo-root.js
generated
vendored
Normal file
7
node_modules/find-parent-dir/example/git-repo-root.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var findParentDir = require('..');
|
||||
findParentDir(__dirname, '.git', function (err, dir) {
|
||||
if (err) return console.error(err);
|
||||
console.log(dir);
|
||||
});
|
||||
45
node_modules/find-parent-dir/index.js
generated
vendored
Normal file
45
node_modules/find-parent-dir/index.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path')
|
||||
, fs = require('fs')
|
||||
, exists = fs.exists || path.exists
|
||||
, existsSync = fs.existsSync || path.existsSync
|
||||
;
|
||||
|
||||
function splitPath(path) {
|
||||
var parts = path.split(/(\/|\\)/);
|
||||
if (!parts.length) return parts;
|
||||
|
||||
// when path starts with a slash, the first part is empty string
|
||||
return !parts[0].length ? parts.slice(1) : parts;
|
||||
}
|
||||
|
||||
exports = module.exports = function (currentFullPath, clue, cb) {
|
||||
|
||||
function testDir(parts) {
|
||||
if (parts.length === 0) return cb(null, null);
|
||||
|
||||
var p = parts.join('');
|
||||
|
||||
exists(path.join(p, clue), function (itdoes) {
|
||||
if (itdoes) return cb(null, p);
|
||||
testDir(parts.slice(0, -1));
|
||||
});
|
||||
}
|
||||
|
||||
testDir(splitPath(currentFullPath));
|
||||
}
|
||||
|
||||
exports.sync = function (currentFullPath, clue) {
|
||||
|
||||
function testDir(parts) {
|
||||
if (parts.length === 0) return null;
|
||||
|
||||
var p = parts.join('');
|
||||
|
||||
var itdoes = existsSync(path.join(p, clue));
|
||||
return itdoes ? p : testDir(parts.slice(0, -1));
|
||||
}
|
||||
|
||||
return testDir(splitPath(currentFullPath));
|
||||
}
|
||||
35
node_modules/find-parent-dir/package.json
generated
vendored
Normal file
35
node_modules/find-parent-dir/package.json
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "find-parent-dir",
|
||||
"version": "0.3.0",
|
||||
"description": "Finds the first parent directory that contains a given file or directory.",
|
||||
"main": "find-parent-dir.js",
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/thlorenz/find-parent-dir.git"
|
||||
},
|
||||
"homepage": "https://github.com/thlorenz/find-parent-dir",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"tap": "~0.4.3"
|
||||
},
|
||||
"keywords": [
|
||||
"find",
|
||||
"parent",
|
||||
"dir",
|
||||
"root",
|
||||
"resolve",
|
||||
"walk"
|
||||
],
|
||||
"author": {
|
||||
"name": "Thorsten Lorenz",
|
||||
"email": "thlorenz@gmx.de",
|
||||
"url": "http://thlorenz.com"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engine": {
|
||||
"node": ">=0.6"
|
||||
}
|
||||
}
|
||||
44
node_modules/find-parent-dir/test/find-parent-dir.js
generated
vendored
Normal file
44
node_modules/find-parent-dir/test/find-parent-dir.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
/*jshint asi: true */
|
||||
|
||||
var test = require('tap').test
|
||||
var path = require('path')
|
||||
var fs = require('fs')
|
||||
var findParentDir = require('..')
|
||||
|
||||
test('finding .git root relative to the test dir', function (t) {
|
||||
findParentDir(__dirname, '.git', function (err, dir) {
|
||||
t.equals(dir, path.resolve(__dirname, '..') + '/')
|
||||
t.end()
|
||||
});
|
||||
})
|
||||
|
||||
test('finding this dir relative to the test dir', function (t) {
|
||||
findParentDir(__dirname, 'find-parent-dir.js', function (err, dir) {
|
||||
t.equals(dir, path.resolve(__dirname))
|
||||
t.end()
|
||||
});
|
||||
})
|
||||
|
||||
test('sync finding .git root relative to the test dir', function (t) {
|
||||
var dir = findParentDir.sync(__dirname, '.git')
|
||||
t.equals(dir, path.resolve(__dirname, '..') + '/')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('sync finding this dir relative to the test dir', function (t) {
|
||||
var dir = findParentDir.sync(__dirname, 'find-parent-dir.js')
|
||||
t.equals(dir, path.resolve(__dirname))
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('find no dir when file is in the test dir', function(t) {
|
||||
var filepath = path.join(__dirname, 'shazam.txt')
|
||||
fs.writeFileSync(filepath, 'shaq attack')
|
||||
findParentDir('/etc', 'shazam.txt', function (err, dir) {
|
||||
fs.unlinkSync(filepath)
|
||||
t.equals(err, null)
|
||||
t.equals(dir, null)
|
||||
t.end()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user