https://github.com/foxt/templey
Simple templating engine for all files.
https://github.com/foxt/templey
Last synced: 3 months ago
JSON representation
Simple templating engine for all files.
- Host: GitHub
- URL: https://github.com/foxt/templey
- Owner: foxt
- License: gpl-3.0
- Created: 2018-09-14T20:22:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-15T17:20:17.000Z (over 6 years ago)
- Last Synced: 2025-02-10T17:44:15.934Z (3 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Templey
## [on npm for some reason](https://www.npmjs.com/package/templey)
### Using as a standalone script
```node templey.js file```
creates file.templeybuild.txt### Using as a module
```require("templey")("input text")```
returns processed string
## Syntax
|file:name| -- Import from a file
|http:address| and |https:address| -- response from http request
|procarg:all| and |procarg:number| -- process arguments, all is space joined
|command:command| -- run a process and return output
|filename:| -- files filename
### Example
```
hello, this is a test of |file:name.txt|, you can escape things too, watch \|file:name.txt|!the ip address that built this is |http:api.ipify.org|
the arguments when building this were |procarg:all| and the nodejs executable is stored at |procarg:0|
the nodejs version is |command:node -v|
this files name on disk is |filename:||file:layers.txt|
```would produce
```
hello, this is a test of templey, you can escape things too, watch |file:name.txt|!the ip address that built this is 0.0.0.0
the arguments when building this were /usr/local/bin/node /Users/thelmgn/Documents/pinghost2/Templey/index.js hello.txt and the nodejs executable is stored at /usr/local/bin/node
the nodejs version is v10.9.0
this files name on disk is hello.txt
you can put tags in other templey scripts like this, we're running from layers.txt and we've got things!
```