fix formatting

This commit is contained in:
LordMZTE 2021-11-14 00:37:29 +01:00
parent 85362caf96
commit db9d56cf82
10 changed files with 46 additions and 31 deletions

View file

@ -4,9 +4,9 @@ This repository contains the AddonScript specification.
## What is AddonScript?
AddonScript is a format to distribute Minecraft addons. An addon could be anything, which is installed
AddonScript is a format to distribute Minecraft addons. An addon could be anything, which is installed
into the Minecraft game, like a mod, modpack, modloader, texturepack or even a world.
AddonScript can be used for example to define how addons are installed, or to specify dependencies
AddonScript can be used for example to define how addons are installed, or to specify dependencies
for addons. This way, addon creators just have to publish the AddonScript file for their addon and let
AddonScript compatible tools (for example launchers) install them.
@ -23,7 +23,7 @@ contribute ideas to the AddonScript specification.
AddonScript depends on nothing, except Minecraft itself (and Java). This means that the specification
does not depend on existing APIs and formats like Curseforge. It also does not reference any specific
modloader like Forge or Fabric, instead they are themselves addons, which can be defined using AddonScript.
This means, that AddonScript is not bound to a specific set of modloaders, instead you can use any
This means, that AddonScript is not bound to a specific set of modloaders, instead you can use any
modloader.
### Universal

View file

@ -2,4 +2,3 @@
Packaging is a way to distribute an AddonScript file and associated files together in a single file.
Currently, the only specified ackaging way is [zip-based packaging](zip.md).

View file

@ -1,6 +1,6 @@
# Addon Object
``` json
```json
{
"addonscript": {},
"id": "myaddon",
@ -28,7 +28,7 @@ It should be written in the `kebab-case` format, meaning lowercase only and usin
### version
This is the version number of this version. It must follow [semver versioning specifications](https://semver.org/spec/v2.0.0.html),
This is the version number of this version. It must follow [semver versioning specifications](https://semver.org/spec/v2.0.0.html),
as they are used to compare versions.
## Optional properties
@ -48,7 +48,7 @@ This is an array of [relation objects](relation.md) which represent addons in re
### flags
This is an array of [flags](../flags.md) for this version.
### repositories
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or

View file

@ -1,6 +1,6 @@
# AddonScript Object
``` json
```json
{
"version": 2
}
@ -11,8 +11,8 @@ Future fields may be added.
# Required properties
## version
This is the version of the addonscript format the file is written in.
The specification you are reading is for version 2. Version 1 is an old version which is deprecated,
and doesn't have to be (and shouldn't be) implemented by tools using addonscript.

View file

@ -79,6 +79,7 @@ cannot be referenced, as only addon-ids are used.
</td>
<td>
<!-- prettier-ignore -->
```json
{
"companion": [

View file

@ -1,6 +1,6 @@
# File Object
``` json
```json
{
"id": "modfile",
"url": "https://example.com/mymod.jar",
@ -19,13 +19,14 @@ This is the ID of the file.
It should be written in the `kebab-case` format, meaning lowercase only and using `-` instead of spaces.
<!--TODO: error if there are multiple relations with the same id and allow multiple urls-->
If multiple file objects in the same array have the same ID, they are treated as the same file,
which means that the first one of them in the array will be used unless it can't be retrieved from the URL,
in which case the next one will be used as a fallback.
### url
This is an [URL](../url.md), which points to the actual file.
This is a [URL](../url.md), which points to the actual file.
### install

View file

@ -1,34 +1,37 @@
# Meta Object
``` json
```json
{
"addon": {
"name": "My cool addon name",
"icon": "./icon.png",
"description":"./README.md",
"summary": "My Addon",
"website": "https://example.com",
"source": "https://gitea.com/user/myaddon",
"issues": "https://gitea.com/user/myaddon/issues",
"contributors": ["Alice", "Bob"]
},
"version": {
"changelog": "./CHANGELOG.md",
"timestamp": 1594753200
},
"additional": {}
"addon": {
"name": "My cool addon name",
"icon": "./icon.png",
"description": "./README.md",
"summary": "My Addon",
"website": "https://example.com",
"source": "https://gitea.com/user/myaddon",
"issues": "https://gitea.com/user/myaddon/issues",
"contributors": ["Alice", "Bob"]
},
"version": {
"changelog": "./CHANGELOG.md",
"timestamp": 1594753200
},
"additional": {}
}
```
## Optional properties
### addon
An [addon mata](#addon-meta-object) object.
### version
A [version mata](#version-meta-object) object.
### additional
This object can contain any arbitrary data,
# Addon Meta Object
@ -36,29 +39,37 @@ This object can contain any arbitrary data,
## Optional Properties
### name
The full, human-readable name of the addon. This is what a program such as a launcher should
display to the user.
### icon
A path to the icon of the addon. This path should point to an image file of small resolution
which is ideally square. It can be dispayed to users in programs.
### description
A path to a description file for the addon. The file should be in CommonMark markdown.
### summary
A short description of the addon, to be shown in lists and menus where the addon is shown aside others.
### website
A URL to a website about the addon
### source
A URL to the source code of the addon.
### issues
A URL to an issue tracker for the addon.
### contributors
An array of people who have contributed to the addon.
# Version Meta Object
@ -66,7 +77,9 @@ An array of people who have contributed to the addon.
## Optional properties
### changelog
A path to a changelog file for the addon.
### timestamp
A unix timestamp of the time and date of the version's release.

View file

@ -14,11 +14,12 @@
### id
This is the ID or namespaced ID of the addon this relation refers to.
This is the ID or namespaced ID of the addon this relation refers to.
### version
<!--TODO: update link one PR is merged-->
This is a [semver version range](https://github.com/semver/semver/pull/584) of supported versions of this relation.
## Optional properties

View file

@ -20,7 +20,7 @@ This is the type of the repository. Possible values are [`api`](../repository/ap
### url
This is the base URL of the repository. While other URLs in AddonScript can have different schemes,
the base URL has to be a http(s) URL, except for `index` and `maven` repositories, where it can also be `file`.
This is the base URL of the repository. While other URLs in AddonScript can have different schemes,
the base URL has to be a http(s) URL, except for `index` and `maven` repositories, where it can also be `file`.
If it is a maven repository the scheme can also be `file`, where
it points to a directory, which contains the maven repository.

View file

@ -1,3 +1,3 @@
#!/bin/sh
# Requires the prettier formatter. This should always be run before committing (looking at you, tilera!)
prettier --write ./**/*.md
prettier --write $(find -name "*.md")