grunt-dj-rename

0.2.3 • Public • Published

grunt-dj-rename

Copy files and folders

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-dj-rename --save-dev

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

grunt.loadNpmTasks('grunt-dj-rename');

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, but in case you can't please use v0.3.2.

Rename task

Run this task with the grunt copy command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Options

hanldeDest

Type: Function(dest)

提供一个处理最终路径生成的handler处理函数

process

Type: Function(content, srcpath)

This option is passed to grunt.file.copy as an advanced way to control the file contents that are copied.

processContent has been renamed to process and the option name will be removed in the future.

noProcess

Type: String

This option is passed to grunt.file.copy as an advanced way to control which file contents are processed.

processContentExclude has been renamed to noProcess and the option name will be removed in the future.

encoding

Type: String
Default: grunt.file.defaultEncoding

The file encoding to copy files with.

mode

Type: Boolean or String
Default: false

Whether to copy or set the destination file and directory permissions. Set to true to copy the existing file and directories permissions. Or set to the mode, i.e.: 0644, that copied files will be set to.

timestamp

Type: Boolean
Default: false

Whether to preserve the timestamp attributes(atime and mtime) when copying files. Set to true to preserve files timestamp. But timestamp will not be preserved when the file contents or name are changed during copying.

Dependencies (2)

Dev Dependencies (6)

Package Sidebar

Install

npm i grunt-dj-rename

Weekly Downloads

2

Version

0.2.3

License

MIT

Last publish

Collaborators

  • wangxin223