source: Dev/trunk/node_modules/grunt-contrib-copy/README.md @ 516

Last change on this file since 516 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 3.2 KB
Line 
1# grunt-contrib-copy [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-contrib-copy.png?branch=master)](http://travis-ci.org/gruntjs/grunt-contrib-copy)
2
3> Copy files and folders.
4
5
6
7## Getting Started
8This plugin requires Grunt `~0.4.0`
9
10If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
11
12```shell
13npm install grunt-contrib-copy --save-dev
14```
15
16Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
17
18```js
19grunt.loadNpmTasks('grunt-contrib-copy');
20```
21
22*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-copy/tree/grunt-0.3-stable).*
23
24
25
26## Copy task
27_Run this task with the `grunt copy` command._
28
29Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
30### Options
31
32#### processContent
33Type: `Function(content, srcpath)`
34
35This option is passed to `grunt.file.copy` as an advanced way to control the file contents that are copied.
36
37#### processContentExclude
38Type: `String`
39
40This option is passed to `grunt.file.copy` as an advanced way to control which file contents are processed.
41
42### Usage Examples
43
44```js
45copy: {
46  main: {
47    files: [
48      {src: ['path/*'], dest: 'dest/', filter: 'isFile'}, // includes files in path
49      {src: ['path/**'], dest: 'dest/'}, // includes files in path and its subdirs
50      {expand: true, cwd: 'path/', src: ['**'], dest: 'dest/'}, // makes all src relative to cwd
51      {expand: true, flatten: true, src: ['path/**'], dest: 'dest/', filter: 'isFile'} // flattens results to a single level
52    ]
53  }
54}
55```
56
57
58## Release History
59
60 * 2013-02-14   v0.4.0   First official release for Grunt 0.4.0.
61 * 2013-01-22   v0.4.0rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
62 * 2013-01-13   v0.4.0rc5   Updating to work with grunt v0.4.0rc5. Conversion to grunt v0.4 conventions. Replace basePath with cwd. Empty directory support.
63 * 2012-10-17   v0.3.2   Pass copyOptions on single file copy.
64 * 2012-10-11   v0.3.1   Rename grunt-contrib-lib dep to grunt-lib-contrib.
65 * 2012-09-23   v0.3.0   General cleanup and consolidation. Global options depreciated.
66 * 2012-09-17   v0.2.4   No valid source check.
67 * 2012-09-16   v0.2.3   Path.sep fallback for node <= 0.7.9.
68 * 2012-09-16   v0.2.2   Single file copy support. Test refactoring.
69 * 2012-09-06   v0.2.0   Refactored from grunt-contrib into individual repo.
70
71---
72
73Task submitted by [Chris Talkington](http://christalkington.com/)
74
75*This file was generated on Fri Feb 22 2013 09:26:58.*
Note: See TracBrowser for help on using the repository browser.