1.2.1 • Published 10 years ago

file-composer v1.2.1

Weekly downloads
4
License
ISC
Repository
github
Last release
10 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

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.6

11 years ago

1.0.5

11 years ago

1.0.4

11 years ago

1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago