1.0.2 • Published 9 years ago

mustache-file-cloner v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

Mustache File Cloner

creates clones of the source file after parsing with against mustache reference file

SETUP:

npm install mustache-file-cloner -g

USAGE:

tachecloner SOURCE_FILE CSV_FILE DEST_FOLDER

SOURCE_FILE defaults to index.html
CSV_FILE defaults to data.csv
DEST_FOLDER defaults to ./clones/. You can omit ./ and the trailing slash.

Example:
tachecloner
tachecloner index.html vars.csv clones
tachecloner -d index.html -m vars.csv -d clones
CSV format:

id will be used to generate suffixes in filenames var_name is a needle to be searched for, encapsulated inside of mustache tags

idvar_namevar_name_2
aaavalue 1value 4
bbbvalue 2value 5
cccvalue 3value 6
Source file example:
<!DOCTYPE html>
<html>
    <head>
      <title>{{var_name}}</title>
    </head>

    <body>
        
      <p>
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eu venenatis ante. 
        {{var_name_2}}
        Nam nec magna finibus lorem bibendum pellentesque.
      </p>

    </body>
</html>