gulp-copy-rex
Version:
Inspired by laravel-elixir's copy() method. ~12062015
67 lines (44 loc) • 1.74 kB
Markdown
# gulp-copy
[](https://travis-ci.org/xrexonx/gulp-copy)
[](https://badge.fury.io/js/gulp-copy-rex)
[](https://www.npmjs.com/package/gulp-copy-rex)
Enables you to copy or transfer files on your gulp task (gulpfile.js).
## Install
```
$ npm install --save-dev gulp-copy-rex
```
[](https://nodei.co/npm/gulp-copy-rex/)
## Usage
Can use this inside of your any gulp tasks or you can create a specific tasks for it.
```js
var copy = require('gulp-copy-rex');
gulp.task('copy', function () {
//array of files ~ array / object
var files = [
'./node_modules/someVendors/vendors.js',
'./bower_components/someVendors2/vendors2.js',
'./bower_components/someVendors3/vendors3.js',
];
or
//single file ~ string
var files = './bower_components/angular/angular.min.js';
copy(files,'yourDestination/folder');
});
```
Using options as 3rd param ~ Minify and Concat files using [gulp-uglify](https://github.com/terinjokes/gulp-uglify) and [gulp-concat](https://github.com/contra/gulp-concat) (not applicable to CSS files)
```js
var opts = {
min:true, //minify ~ default false
concat:true, //concat ~ default false
filename:'app' //set filename
}
copy(files, dist, opts);
});
```
## Run Task
```
$ gulp copy
```
## License
MIT © [Rexon A. De los Reyes](http://xrexonx.github.io)
#### Thanks and Enjoy. Goodspeed. ~ xrexonx