Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 15 days 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 (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:57:46.000Z (about 1 year ago)
- Last Synced: 2024-04-25T15:43:30.178Z (8 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- 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