Globbing utilities for Grunt.js and node.js projects.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitattributes
.gitignore
.jshintrc
.travis.yml
.verbrc.md
LICENSE-MIT
README.md
index.js
package.json

README.md

glob-utils NPM version

Utilities for file globbing and Grunt.js projects.

Install

Install with npm:

npm i glob-utils --save-dev

Usage

var glob = require('glob-utils');

API

.expand

  • patterns {String}: File paths or glob patterns to expand.
  • options {Object}: Options to pass to [globby]
  • returns: {Array}

Return a glob of file paths.

.basename

  • patterns {String}: File paths or glob patterns to expand.
  • options {Object}: Options to pass to [globby]
  • returns: {Array}

Return a glob of basenames.

.parse

  • patterns {String}: File paths or glob patterns to expand.
  • options {Object}: Options to pass to [globby] and [gray-matter]
  • returns: {Array}

Return a glob of files, with yaml front matter parsed.

.read

  • patterns {String}: File paths or glob patterns to expand.
  • options {Object}: Options to pass to [globby]
  • returns: {Array}

Return a glob of files with content.

.file

Return a glob of file objects, including:

  • patterns {String}: File paths or glob patterns to expand.
  • options {Object}: Options to pass to [globby]
  • returns: {Array}

    • basename: the basename of the file path
    • content: the content, from fs.readFileSync

Author

Jon Schlinkert

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license


This file was generated by verb-cli on August 28, 2014.