mustache-file-cloner

1.0.2 • Public • Published

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

id var_name var_name_2
aaa value 1 value 4
bbb value 2 value 5
ccc value 3 value 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>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    0
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i mustache-file-cloner

Weekly Downloads

2

Version

1.0.2

License

ISC

Last publish

Collaborators

  • criography