creates clones of the source file after parsing with against mustache reference file
npm install mustache-file-cloner -g
SOURCE_FILE defaults to index.html
CSV_FILE defaults to data.csv
DEST_FOLDER defaults to ./clones/
. You can omit ./
and the trailing slash.
tachecloner
tachecloner index.html vars.csv clones
tachecloner -d index.html -m vars.csv -d clones
id will be used to generate suffixes in filenames var_name is a needle to be searched for, encapsulated inside of mustache tags
id | var_name | var_name_2 |
---|---|---|
aaa | value 1 | value 4 |
bbb | value 2 | value 5 |
ccc | value 3 | value 6 |
<!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>