[README] Clarify and integrate documentation.
This commit is contained in:
parent
fdd9490038
commit
7bcb995e9d
26
README.md
26
README.md
|
@ -28,13 +28,13 @@ to do this for you.
|
||||||
git clone https://git.doublefourteen.io/lua/moonspeak
|
git clone https://git.doublefourteen.io/lua/moonspeak
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Move to the repository root directory:
|
2. Move to repository root directory:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd moonspeak
|
cd moonspeak
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Resolve any dependency using **crush**.
|
3. Resolve dependencies using **crush**.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
lua crush.lua
|
lua crush.lua
|
||||||
|
@ -42,12 +42,12 @@ lua crush.lua
|
||||||
|
|
||||||
You should now see a `lib` subdirectory containing the necessary dependencies.
|
You should now see a `lib` subdirectory containing the necessary dependencies.
|
||||||
|
|
||||||
## Using crush in my library to depend on moonspeak
|
## Integrating moonspeak in my project using crush
|
||||||
|
|
||||||
1. Download the latest [crush.lua](https://git.doublefourteen.io/lua/crush/src/branch/master/crush.lua) file and
|
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.
|
place it in your project's root directory.
|
||||||
|
|
||||||
2. Create a `.lovedeps` text file in your project's root containing the following dependency entry:
|
2. Create a `.lovedeps` text file in your project's root with the following dependency entry:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,21 @@ You should now see a `lib` subdirectory containing the necessary dependencies.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Now any project using your library will be able to fetch `moonspeak` and its dependencies automatically.
|
3. `moonspeak` can now be downloaded directly by `crush` to the project's `lib` directory,
|
||||||
|
along with any other dependency:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
lua crush.lua
|
||||||
|
```
|
||||||
|
|
||||||
|
4. You may now use `moonspeak` in your project by `require()`-ing it.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
local moonspeak = require 'lib.moonspeak'
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Any project depending on yours may now fetch your project's dependencies (including `moonspeak`)
|
||||||
|
automatically using **crush**, following the above procedure.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue