Extend about section in readme
This commit is contained in:
parent
7b390ce77a
commit
84ee3360a5
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,11 @@ Makes your configs (almost) see-through.
|
||||||
|
|
||||||
Glass is a Lua library that makes it easy to lazy-load configuration files into a Lua table at runtime. Its main purpose is to make accessing different configuration files "transparent" to the programmer.
|
Glass is a Lua library that makes it easy to lazy-load configuration files into a Lua table at runtime. Its main purpose is to make accessing different configuration files "transparent" to the programmer.
|
||||||
|
|
||||||
|
With Glass, you can index a key in an object in a JSON file in a subdirectory as if indexing a nested table.
|
||||||
|
|
||||||
|
As a side effect, it also decouples the code from the config format:
|
||||||
|
your program doesn't need to care whether a specific configuration file is in YAML or JSON format as long as the structure is correct.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
Assume the file `app/config/settings.json` exists in your project directory with the content `{"user":{"name":"User"}}`
|
Assume the file `app/config/settings.json` exists in your project directory with the content `{"user":{"name":"User"}}`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue