Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
✨ Update reference and code blocks, add acknowledgement
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixr-codes committed Oct 16, 2023
1 parent ab4afd3 commit e927852
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/codeblockplus.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Overview

Some features of Allay are inspired by the wonderful
[Regolith project](https://bedrock-oss.github.io/regolith/).

Each Allay project resembles one or more coherent packs. For example adding a new
block into the game requires both a behavior pack for the behavior of the block
and a resource pack for the textures. If two or more packs are not coherent they
Expand Down
2 changes: 1 addition & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@

---

[Credits]()
[Acknowledgement](./acknowledgement.md)
15 changes: 15 additions & 0 deletions src/acknowledgement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Acknowledgement

The base idea originated from the wonderful
[Regolith project](https://bedrock-oss.github.io/regolith/) by
[Bedrock OSS](https://github.com/Bedrock-OSS). Features like scripts
([filters](https://bedrock-oss.github.io/regolith/guide/filters)) and the
[project structure](https://github.com/Bedrock-OSS/project-config-standard) are
inspired by Regolith. The [Bedrock Wiki](https://wiki.bedrock.dev/) helped a lot as
well for references like localization and the manifest file format.

[mdBook](https://rust-lang.github.io/mdBook/) is used for the documentation website.
Its pretty design and customization support allows us to document Allay in the best
possible way.


5 changes: 5 additions & 0 deletions src/reference/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Reference

The reference covers the details of various areas of Allay.

- [Configuration](./configuration.md)
- [Commands](./cli/index.md)
94 changes: 92 additions & 2 deletions src/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ scripts as well.
- [`authors`](#the-authors-field)
- [`license`](#the-license-field)
- [`url`](#the-url-field)
- [`localization`](#the-localization-section)
- [`[localization]`](#the-localization-section)
- [`primary-language`](#the-primary-language-field)
- [`localization-groups`](#the-localization-groups-field)
- [`scripts`](#the-scripts-section)
- [`[scripts]`](#the-scripts-section)
- [`base-path`](#the-base-path-field)
- [`pre`](#the-pre-field)
- [`post`](#the-post-field)
- [`[build]`](#the-build-section)
- [`include`](#the-include-and-exclude-field)
- [`exclude`](#the-include-and-exclude-field)
- [`use-custom-manifest`](#the-use-custom-manifest-field)

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -122,12 +126,98 @@ url = "https://github.com/allay-mc/example"

### The `primary-language` field

The primary language the add-on use. This is the language that untranslated
languages will ultimatively fall back to.

```toml,icon=gear,filepath=allay.toml
[localization]
primary-language = "en-us"
```

### The `localization-groups` field

Using this field allows you to override existing language groups or create new
ones. This is explained in detail in [chapter 4](../localitaion.md)

```toml,icon=gear,filepath=allay.toml
[localization]
localization-groups = [
["ru-ru", "uk-ua"],
# puts russian and ukrainian in the same group meaning if a translation for
# russian exists, ukrainian will fall back to that and vice versa

["de-de", "de-at"]
# puts german german and austrian german, which is not supported natively but
# could be implemented with a resource pack, in one group
]
```

## The `[scripts]` section

### The `base-path` field

This is the path relative to the project's root directory (the directory that
contains the `allay.toml` file) where scripts should be searched for. This is
the `scripts` directory by convention but you are free to choose whatever
directory you want.

### The `pre` field

An array of scripts run before building the add-on. This is explained in detail
in [chapter 3](../scripts/index.md)

### The `post` field

An array of scripts run afte the add-ons have been built. This is explained in
detail in [chapter 3](../scripts/index.md)


## The `[build]` section

### The `include` and `exclude` field

These fields allow you to specify glob patterns which

```toml,icon=gear,filepath=allay.toml
include = [
"**/*.json",
"**/*.md",
"**/*.js",
"**/*.png",
"**/*.mcfunction",
"**/*.mcstructure",
"**/*.lang",
]
```

The configuration above makes Allay remove all files except the ones that have
one of the above mentioned file extensions. Using this field is generally
discouraged because an add-on uses several different files with different names
and extensions. Minecraft will not complain if the add-on contains unrecognized
files. It should be the job of scripts which convert files that are not used in
the final build to remove those files.

Using the `exclude` file on the other hand is acceptable if a script for example
does not remove unused files or if you just want to include notices in the source
but remove them in the build.

```toml,icon=gear,filepath=allay.toml
exclude = ["**/LICENSE.txt", "**/README.md"]
```

The above example keeps all files except those named `LICENSE.txt` and `README.md`.

```admonish warning
You cannot set both `include` and `exclude` at the same time.
```

```admonish important
The `manifest.json` file is the only file that is kept no matter what patterns are
specified in `include` and `exclude`.
```

### The `use-custom-manifest` field

Because the `allay.toml` removes the need of a `manifest.json` file, Allay will
display a warning if it found such file and ignores it. If you, for some reason
need to use a custom `manifest.json`, then set this option to `true`.

0 comments on commit e927852

Please sign in to comment.