glob-utils

0.4.1 • Public • Published

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.

Dependents (2)

Package Sidebar

Install

npm i glob-utils

Weekly Downloads

1,102

Version

0.4.1

License

MIT

Last publish

Collaborators

  • doowb
  • jonschlinkert