glob-utils

Utilities for file globbing and Grunt.js projects.

glob-utils

Utilities for file globbing and Grunt.js projects.

Install with npm:

npm i glob-utils --save-dev
var glob = require('glob-utils');

.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

Jon Schlinkert

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


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