Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vilicvane/duplicate
Keep two directories synchronized.
https://github.com/vilicvane/duplicate
Last synced: 20 days ago
JSON representation
Keep two directories synchronized.
- Host: GitHub
- URL: https://github.com/vilicvane/duplicate
- Owner: vilicvane
- Created: 2015-01-05T17:43:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-02T11:59:18.000Z (almost 10 years ago)
- Last Synced: 2024-11-28T19:55:01.451Z (25 days ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Duplicate
This tool is for keeping specific files of two directories synchronized. You may use it in
[Gulp](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#3-create-a-gulpfilejs-at-the-root-of-your-project)
or [Grunt](http://gruntjs.com/creating-tasks#basic-tasks).It will copy all matching files to dest directory before watching.
## Install
```sh
npm install duplicate --save-dev
```## Usage
```javascript
var duplicate = require('duplicate');duplicate({
src: [
'scripts/**/*.js',
'css/**/*.css',
'images/**/*',
'merges/**/*',
'*.html'
],
dest: '../app-cordova'
});
```## API Definitions
```typescript
interface IOptions {
/** refer to https://github.com/es128/anymatch */
src: any;
dest: string;
/**
* default to /(?:^|[\/\\])(?:\.(?![\/\\]|$)|node_modules(?=[\/\\]|$))/,
* make sure path '.' will not be ignored.
*/
ignored?: RegExp | (path: string) => boolean;
}declare function duplicate(options: IOptions): void;
declare module duplicate { }
```