grunt-file-exist

0.0.3 • Public • Published

grunt-file-exist

Build Status

It is a task that you want to check file of a predetermined pattern or are present.

Getting Started

This plugin requires Grunt.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-file-exist --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-file-exist');

The "file_exist" task

Overview

In your project's Gruntfile, add a section named file_exist to the data object passed into grunt.initConfig().

grunt.initConfig({
  file_exist: {
    options: {
      output: 'reports/log.txt' //Where the log is output.
    },
    your_target: {
      options: {
        patterns: ['l.png', 'm.png', 's.png']
      },
      src: [
        'img/thumbs/*/'
      ]
    },
  },
})

Options

options.patterns

Type: Array

Pattern names of your files you want to check.

options.detail

Type: Boolean Default value: false

Whether or not to display the details of the check result.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2014 HAKASHUN. Licensed under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i grunt-file-exist

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • hakashun