to-absolute-glob

WebJar for to-absolute-glob

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

to-absolute-glob
Last Version

Last Version

2.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

to-absolute-glob
WebJar for to-absolute-glob
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/micromatch/to-absolute-glob

Download to-absolute-glob

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/to-absolute-glob/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>to-absolute-glob</artifactId>
    <version>2.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/to-absolute-glob/
implementation 'org.webjars.npm:to-absolute-glob:2.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/to-absolute-glob/
implementation ("org.webjars.npm:to-absolute-glob:2.0.2")
'org.webjars.npm:to-absolute-glob:jar:2.0.2'
<dependency org="org.webjars.npm" name="to-absolute-glob" rev="2.0.2">
  <artifact name="to-absolute-glob" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='to-absolute-glob', version='2.0.2')
)
libraryDependencies += "org.webjars.npm" % "to-absolute-glob" % "2.0.2"
[org.webjars.npm/to-absolute-glob "2.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : is-absolute jar [1.0.0,2)
org.webjars.npm : is-negated-glob jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

to-absolute-glob NPM version NPM downloads Linux Build Status Windows Build Status

Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.

Install

Install with npm:

$ npm install --save to-absolute-glob

Usage

var toAbsGlob = require('to-absolute-glob');
toAbsGlob('a/*.js');
//=> '/dev/foo/a/*.js'

Examples

Given the current project folder (cwd) is /dev/foo/:

makes a path absolute

toAbsGlob('a');
//=> '/dev/foo/a'

makes a glob absolute

toAbsGlob('a/*.js');
//=> '/dev/foo/a/*.js'

retains trailing slashes

toAbsGlob('a/*/');
//=> '/dev/foo/a/*/'

retains trailing slashes with cwd

toAbsGlob('./fixtures/whatsgoingon/*/', {cwd: __dirname});
//=> '/dev/foo/'

makes a negative glob absolute

toAbsGlob('!a/*.js');
//=> '!/dev/foo/a/*.js'

from a cwd

toAbsGlob('a/*.js', {cwd: 'foo'});
//=> '/dev/foo/foo/a/*.js'

makes a negative glob absolute from a cwd

toAbsGlob('!a/*.js', {cwd: 'foo'});
//=> '!/dev/foo/foo/a/*.js'

from a root path

toAbsGlob('/a/*.js', {root: 'baz'});
//=> '/dev/foo/baz/a/*.js'

from a root slash

toAbsGlob('/a/*.js', {root: '/'});
//=> '/dev/foo/a/*.js'

from a negative root path

toAbsGlob('!/a/*.js', {root: 'baz'});
//=> '!/dev/foo/baz/a/*.js'

from a negative root slash

toAbsGlob('!/a/*.js', {root: '/'});
//=> '!/dev/foo/a/*.js'

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Commits Contributor
16 doowb
15 jonschlinkert
1 phated
1 erikkemperman

Building docs

(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

To generate the readme and API documentation with verb:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb-generate-readme, v0.2.0, on October 17, 2016.

org.webjars.npm

micromatch

Libraries for fast, accurate glob matching.

Versions

Version
2.0.2