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

@ -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",

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

@ -19,6 +19,7 @@ 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

@ -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")