Skip to content

Copies recursively the files from source directory to destination directory with LoDash's templating method.

License

Notifications You must be signed in to change notification settings

leftstick/template-directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

template-directory

================== NPM version

Copies recursively the files from source directory to destination directory with LoDash's templating method.

Installation

npm install template-directory --save-dev

Usage

var template = require('template-directory');

template('/tmp/mydir', '/tmp/mynewdir', {
    name: 'hello'
}, {
  clobber: false,
  templateOptions: {variable: 'data'}
});

//if you don't have settings, you can simply omit it
template('/tmp/mydir', '/tmp/mynewdir', {
    name: 'hello'
});

//if you have neither settings, nor data. Just leave them
template('/tmp/mydir', '/tmp/mynewdir');

template(source, destination[, data, settings])

Copies recursively the files from source directory to destination directory.

  • Copy file directly if it is binary
  • Templating file if it is text file with LoDash's templating method
  • data is used to interpolated the text files

Available settings:

  • clobber: defaults to true, overwrites destination files
  • templateOptions is template-options just passed to _.template

LICENSE

MIT License

About

Copies recursively the files from source directory to destination directory with LoDash's templating method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages