Skip to content

debugwand/grunt-gitexclude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-gitexclude

Add and update a list of files into git exclude

Getting Started

This plugin requires Grunt ~0.4.1

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 git+https://git@github.com/debugwand/grunt-gitexclude.git --save-dev

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

grunt.loadNpmTasks('grunt-gitexclude');

The "gitexclude" task

Overview

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

grunt.initConfig({
  gitexclude: {
    options: {
      id: "unique_identifier_for_the_list_of_files_to_ignore"
    },
    your_target: {
      destDir: 'foo/bar', //project folder where .git folder can be found. don't include .git/info/exclude, that is handled in the code
      src: ['folder/file', 'folder/folder'] //lines to add to git exclude
    },
  },
})

Options

options.id

Type: String Default value: ''

A string value that is used to demark the start and end of your list of files in the exclude file. This allows you to overwrite a block when you run the task rather than continually append to the file.

Release History

0.1.0 first release

About

Add files to git exclude

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published