🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

grunt-file-missing

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-file-missing

Check files for existence.

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

grunt-file-missing

Check files and folders for existence.

Getting Started

This plugin requires Grunt ~0.4.0

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-missing --save-dev

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

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

FileMissing task

Run this task with the grunt fileMissing command.

Examples

Will fail if either or both are missing:

fileMissing: {
  scripts: {
    options{
      files: ['a.js', 'b.js']
    }
  }
},

Will not fail, instead, if one or more files missing, will run missing callback function for each missing file, otherwise will run exists callback function for files array:

fileMissing: {
	test_fixtures: {
    options{
      files: ['test/fixtures/*.txt'],
      missing: function(file){ console.log(file, 'is missing!'); },
      exists: function(files){ console.log('All these files exist:', files); }
    }
  }
},

Keywords

gruntplugin

FAQs

Package last updated on 20 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts