82f2b76e25
We now use webpack instead of SystemJS, effectively bundling modules into one file (plus commons chunks) for every entry point. This results in a much smaller extension size (almost half). Furthermore we use yarn/npm even for extension run-time dependencies. This relieves us from manually vendoring and building dependencies. It's also easier to understand for new developers familiar with node.
44 lines
1.5 KiB
Markdown
44 lines
1.5 KiB
Markdown
glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master)
|
|
======
|
|
Javascript module to extract the non-magic parent path from a glob string.
|
|
|
|
[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/)
|
|
[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/)
|
|
|
|
Usage
|
|
-----
|
|
```sh
|
|
npm install glob-parent --save
|
|
```
|
|
|
|
```js
|
|
var globParent = require('glob-parent');
|
|
|
|
globParent('path/to/*.js'); // 'path/to'
|
|
globParent('/root/path/to/*.js'); // '/root/path/to'
|
|
globParent('/*.js'); // '/'
|
|
globParent('*.js'); // '.'
|
|
globParent('**/*.js'); // '.'
|
|
globParent('path/{to,from}'); // 'path'
|
|
globParent('path/!(to|from)'); // 'path'
|
|
globParent('path/?(to|from)'); // 'path'
|
|
globParent('path/+(to|from)'); // 'path'
|
|
globParent('path/*(to|from)'); // 'path'
|
|
globParent('path/@(to|from)'); // 'path'
|
|
globParent('path/**/*'); // 'path'
|
|
|
|
// if provided a non-glob path, returns the nearest dir
|
|
globParent('path/foo/bar.js'); // 'path/foo'
|
|
globParent('path/foo/'); // 'path/foo'
|
|
globParent('path/foo'); // 'path' (see issue #3 for details)
|
|
|
|
```
|
|
|
|
Change Log
|
|
----------
|
|
[See release notes page on GitHub](https://github.com/es128/glob-parent/releases)
|
|
|
|
License
|
|
-------
|
|
[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE)
|