https://github.com/deebloo/replace-temp-values
small module to replace template values in a file
https://github.com/deebloo/replace-temp-values
Last synced: 10 months ago
JSON representation
small module to replace template values in a file
- Host: GitHub
- URL: https://github.com/deebloo/replace-temp-values
- Owner: deebloo
- Created: 2014-09-07T01:07:20.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:57:46.000Z (over 2 years ago)
- Last Synced: 2025-08-22T04:58:58.770Z (11 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I reccomend using the more generic [find-and-replace](https://github.com/DannyBlueDesign/find-and-replace) instead
Replace Template Values
=========
A tiny module for replacing template values in a file.
Values to be replaced should be book ended with %%.
## Installation
```TXT
npm install replace-temp-values --save
```
## Usage
myFile.txt
```TXT
%Heading%
Welcome to this months newsletter
...
%Footer%
```
app.js
```JS
var replace = require('replace-temp-values');
var values = {'Heading': 'Good Morning San Diego!', 'Footer': 'Yaz Flute'};
replace('myFile.txt', 'newFile.txt', values);
```
* 0.1.5