[README] Update dependencies information, explain how to use crush.

This commit is contained in:
Lorenzo Cogotti 2022-08-17 12:15:02 +02:00
parent a3488431b2
commit fdd9490038
1 changed files with 47 additions and 9 deletions

View File

@ -3,7 +3,7 @@ moonspeak - LÖVE game localization library
**moonspeak** is a basic internationalization library for
the [LÖVE](https://love2d.org/) engine.
It makes your game easy to translate into multiple languages.
It makes your game easy to translate to multiple languages.
**moonspeak** does the following:
@ -11,16 +11,55 @@ It makes your game easy to translate into multiple languages.
* Allows selecting one of the many available languages.
* Translates messages by id (and provides default fallback to English).
Dependencies
============
## Dependencies
**moonspeak** uses [df-serialize](https://git.doublefourteen.io/lua/df-serialize)
to read the dictionary file.
**df-serialize** is also available on [LuaRocks](https://luarocks.org/modules/1414codeforge/df-serialize).
You may either doenload **df-serialize** manually and place it inside a `lib` subdirectory,
or use [crush](https://git.doublefourteen.io/lua/crush)
to do this for you.
Documentation
=============
## Using crush to download moonspeak dependencies
1. Clone this repository.
```sh
git clone https://git.doublefourteen.io/lua/moonspeak
```
2. Move to the repository root directory:
```sh
cd moonspeak
```
3. Resolve any dependency using **crush**.
```sh
lua crush.lua
```
You should now see a `lib` subdirectory containing the necessary dependencies.
## Using crush in my library to depend on moonspeak
1. Download the latest [crush.lua](https://git.doublefourteen.io/lua/crush/src/branch/master/crush.lua) file and
place it into your project root directory.
2. Create a `.lovedeps` text file in your project's root containing the following dependency entry:
```lua
{
moonspeak = "https://git.doublefourteen.io/lua/moonspeak",
-- ...more dependencies, if necessary...
}
```
Now any project using your library will be able to fetch `moonspeak` and its dependencies automatically.
## Documentation
Code is documented with [LDoc](https://github.com/lunarmodules/LDoc).
@ -33,7 +72,6 @@ ldoc init.lua
`ldoc` outputs to a local `doc` directory, open `index.html`
with your favorite browser to read it.
License
=======
## License
See [LICENSE](LICENSE) for details.
Zlib, See [LICENSE](LICENSE) for details.