glob-stream

WebJar for glob-stream

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

glob-stream
Last Version

Last Version

6.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

glob-stream
WebJar for glob-stream
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/gulpjs/glob-stream

Download glob-stream

How to add to project

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

Dependencies

compile (10)

Group / Artifact Type Version
org.webjars.npm : glob-parent jar [3.1.0,4)
org.webjars.npm : remove-trailing-separator jar [1.0.1,2)
org.webjars.npm : pumpify jar [1.3.5,2)
org.webjars.npm : ordered-read-streams jar [1.0.0,2)
org.webjars.npm : unique-stream jar [2.0.2,3)
org.webjars.npm : to-absolute-glob jar [2.0.0,3)
org.webjars.npm : readable-stream jar [2.1.5,3)
org.webjars.npm : is-negated-glob jar [1.0.0,2)
org.webjars.npm : glob jar [7.1.1,8)
org.webjars.npm : extend jar [3.0.0,4)

Project Modules

There are no modules declared in this project.

glob-stream

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

A Readable Stream interface over node-glob.

Usage

var gs = require('glob-stream');

var readable = gs('./files/**/*.coffee', { /* options */ });

var writable = /* your WriteableStream */

readable.pipe(writable);

You can pass any combination of glob strings. One caveat is that you cannot only pass a negative glob, you must give it at least one positive glob so it knows where to start. If given a non-glob path (also referred to as a singular glob), only one file will be emitted. If given a singular glob and no files match, an error is emitted (see also options.allowEmpty).

API

globStream(globs, options)

Takes a glob string or an array of glob strings as the first argument and an options object as the second. Returns a stream of objects that contain cwd, base and path properties.

Options

options.allowEmpty

Whether or not to error upon an empty singular glob.

Type: Boolean

Default: false (error upon no match)

options.dot

Whether or not to treat dotfiles as regular files. This is passed through to node-glob.

Type: Boolean

Default: false

options.silent

Whether or not to suppress warnings on stderr from node-glob. This is passed through to node-glob.

Type: Boolean

Default: true

options.cwd

The current working directory that the glob is resolved against.

Type: String

Default: process.cwd()

options.root

The root path that the glob is resolved against.

Note: This is never passed to node-glob because it is pre-resolved against your paths.

Type: String

Default: undefined (use the filesystem root)

options.base

The absolute segment of the glob path that isn't a glob. This value is attached to each glob object and is useful for relative pathing.

Type: String

Default: The absolute path segement before a glob starts (see glob-parent)

options.cwdbase

Whether or not the cwd and base should be the same.

Type: Boolean

Default: false

options.uniqueBy

Filters stream to remove duplicates based on the string property name or the result of function. When using a function, the function receives the streamed data (objects containing cwd, base, path properties) to compare against.

Type: String or Function

Default: 'path'

other

Any glob-related options are documented in node-glob. Those options are forwarded verbatim, with the exception of root and ignore. root is pre-resolved and ignore is joined with all negative globs.

Globbing & Negation

var stream = gs(['./**/*.js', '!./node_modules/**/*']);

Globs are executed in order, so negations should follow positive globs. For example:

The following would not exclude any files:

gs(['!b*.js', '*.js'])

However, this would exclude all files that started with b:

gs(['*.js', '!b*.js'])

glob-stream for enterprise

Available as part of the Tidelift Subscription

The maintainers of glob-stream and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

License

MIT

org.webjars.npm

gulp

A toolkit to automate & enhance your workflow

Versions

Version
6.1.0
5.0.0
4.0.1
3.1.18