tdi

tdir

Directory Templating for node

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

4

License

BSD-3-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Directory Templating

Build Status

This module allows you to convert a directory structure into a template. The template is a simple JavaScript object, which can then be used to recreate the original folder. In addition, files may be flagged as templates, making this module ideal for bootstrapping things.

This module makes use of generators, so you need a node version >=0.11 and run your application with the harmony flag. Install the module globally via npm install -g tdir or locally via npm install tdir.

CLI

If globally installed, the module provides a command line interface, exposing two commands.

tdir scan [directory]

Scans a directory (the current working directory by default) and outputs the resulting template on the commandline. Accepts the following options:

  • -o, --output <file>: A file into which to write the generated data
  • -t, --template <regex>: The regular expression by which to identify if a file should be treated as a template. Defaults to #TEMPLATE\n. The first matched occurence will be removed from the resulting file.
  • -e, --encoding <encoding>: Determines the encoding of the output data. This might be useful if you want human readable templates and have no binary files scanned. It defaults to base64.

tdir apply

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial