1.0.5 • Published 8 years ago

elixir-copy v1.0.5

Weekly downloads
15
License
-
Repository
-
Last release
8 years ago

elixir-copy - Elixir recipe to copy files from on directory to another

Prerequirement

You have to install Laravel's Elixir(Version 3.0 or higher) and its dependencies first.

Installation

Install with Node.js

npm install elixir-copy

Usage

Add it to your Elixir-enhanced Gulpfile, like so:

var elixir = require('laravel-elixir');

// import the dependency
var copy = require('elixir-copy');

elixir(function(mix) {
  mix.copyto('file.ext', 'path/to/folder');
});

This will copy the file (located by default in your resources/assets/ folder to the destination folder.

You can also provide an array of input files which will be compiled into a single file.

mix.copyto(['file.ext', 'file2.ext'], 'path/to/folder');

By default, it will look for files in your resources/assets/ folder. All files provide in the input array need be relative to this folder. However you can override the default source folder as well.

mix.copyto(['file.ext', 'file2.ext'], 'path/to/folder', 'some/source/folder');

The source folder is relative to your Laravel root folder.

Want to mirror the folder structure? In the options, provide a flag of mirror and the recipe will duplicate the entire folder structure from the source files to the destination folder:

mix.copyto(['file.ext', 'sub/folder/file2.ext'], 'path/to/folder', 'some/source/folder', { mirror: true });

This will create the complete path of path/to/folder/some/source/folder/file.ext and path/to/folder/some/source/folder/sub/folder/file2.ext.

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago