mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-17 07:43:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
55
node_modules/find-root/README.md
generated
vendored
Normal file
55
node_modules/find-root/README.md
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# find-root
|
||||
recursively find the closest package.json
|
||||
|
||||
[](https://circleci.com/gh/jden/find-root)
|
||||
|
||||
## usage
|
||||
Say you want to check if the directory name of a project matches its
|
||||
module name in package.json:
|
||||
|
||||
```js
|
||||
var path = require('path')
|
||||
var findRoot = require('find-root')
|
||||
|
||||
// from a starting directory, recursively search for the nearest
|
||||
// directory containing package.json
|
||||
var root = findRoot('/Users/jden/dev/find-root/tests')
|
||||
// => '/Users/jden/dev/find-root'
|
||||
|
||||
var dirname = path.basename(root)
|
||||
console.log('is it the same?')
|
||||
console.log(dirname === require(path.join(root, 'package.json')).name)
|
||||
```
|
||||
|
||||
|
||||
## api
|
||||
|
||||
### `findRoot: (startingPath : String) => String`
|
||||
|
||||
Returns the path for the nearest directory to `startingPath` containing
|
||||
a `package.json` file, eg `/foo/module`.
|
||||
|
||||
Throws an error if no `package.json` is found at any level in the
|
||||
`startingPath`.
|
||||
|
||||
|
||||
## installation
|
||||
|
||||
$ npm install find-root
|
||||
|
||||
|
||||
## running the tests
|
||||
|
||||
From package root:
|
||||
|
||||
$ npm install
|
||||
$ npm test
|
||||
|
||||
|
||||
## contributors
|
||||
|
||||
- jden <jason@denizac.org>
|
||||
|
||||
|
||||
## license
|
||||
MIT. (c) MMXIII AgileMD http://agilemd.com
|
||||
Reference in New Issue
Block a user