SailsGulpify.copyFiles()

Copy files and folders to another directory

Copies files and folders (cp -r)

Usage

Hover over inputs/exits for more info.

var SailsGulpify = require('machinepack-sailsgulpify');


// Copy files and folders to another directory

SailsGulpify.copyFiles({

gulpFileSrcPath: '../templates/gulpfile.js',

outputDir: '../../../gulpfile.js',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Nothing exists at the provided LESS source directory path.

doesNotExist: function (result) {

 

},

// OK.

success: function () {

 

},

});

Inputs

gulpFileSrcPath required

The directory where the gulp file lives. If not specified as an absolute path, this will be resolved relative to the current working directory.

'../templates/gulpfile.js'
outputDir required

The path to the directory where gulp file should be placed.

'../../../gulpfile.js'

Exits

error

An unexpected error occurred.

doesNotExist

Nothing exists at the provided LESS source directory path.

'abc123'
success

OK.

N/A