https://github.com/hellerve/env
A environment variable DSL for zepto
https://github.com/hellerve/env
Last synced: 4 days ago
JSON representation
A environment variable DSL for zepto
- Host: GitHub
- URL: https://github.com/hellerve/env
- Owner: hellerve
- Created: 2016-11-15T12:23:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-15T12:23:37.000Z (over 9 years ago)
- Last Synced: 2025-07-24T10:31:47.016Z (8 months ago)
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# env
An environment variable language for zepto.
It manages your environment variables and parses
them into appropriate datatypes.
It is inspired by [envy](https://github.com/lexi-lambda/envy)
for Racket and [envied](https://github.com/eval/envied) for Ruby.
## Usage
There is a simple example in the
[examples](https://github.com/hellerve/env/blob/master/examples/syntax.zp)
directory. On a high level, the syntax for the configuration
language is as follows:
```
#lang env
VARNAME
; comment
VARNAME2:
```
Commented lines begin with semicolons.
Valid types are: `string`, `number`, `integer`, `float`, `complex`,
`ratio`, `list`, `vector`, and `hash-map`. For the number literals,
use them as they would be parsed by zepto (i.e., a ratio looks like
this: `1/1`), for collection types `env` assumes whitespace delimited
collections of strings.
```
#lang env
; mylist=1 2 3 => ["1" "2" "3"]
mylist: list
; myvec=1 2 3 => {1" "2" "3"}
myvec: vector
; myhash=1 2 3 4 => #{1" "2", "3" "4"}
myhash: hashmap
```
Have fun!