1.2.1 • Published 9 years ago

file-composer v1.2.1

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

Intro

file-composer is a templating engine for the filesystem.

You can include multiple files into another at inserting points.

Supports multilevel include and parameters replacement.

Example

#file main.txt
Foo
    !include(file1.txt, {values: {param1: "Baz"}})

#file file1.txt
Bar
{{ param1 }}

#output.txt
Foo
    Bar
    Baz

Complete example

More examples

To install

npm install -g file-composer

To use

file-composer -i example/main.txt -o example/output.txt --base=example

Or to replace defined params:

file-composer -i example/main.txt -o example/output.txt --base=example -v param1:123

To use as a dependency

npm install --save-dev file-composer
var fileComposer = require('file-composer');

fileComposer.render({
	i: './example/main.txt',
	o: './example/output.txt',
	b: './example'
});
1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.6

9 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago