fix formatting
This commit is contained in:
parent
85362caf96
commit
db9d56cf82
10 changed files with 46 additions and 31 deletions
|
@ -4,9 +4,9 @@ This repository contains the AddonScript specification.
|
||||||
|
|
||||||
## What is AddonScript?
|
## 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.
|
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
|
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.
|
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
|
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
|
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.
|
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.
|
modloader.
|
||||||
|
|
||||||
### Universal
|
### Universal
|
||||||
|
|
|
@ -2,4 +2,3 @@
|
||||||
|
|
||||||
Packaging is a way to distribute an AddonScript file and associated files together in a single file.
|
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).
|
Currently, the only specified ackaging way is [zip-based packaging](zip.md).
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Addon Object
|
# Addon Object
|
||||||
|
|
||||||
``` json
|
```json
|
||||||
{
|
{
|
||||||
"addonscript": {},
|
"addonscript": {},
|
||||||
"id": "myaddon",
|
"id": "myaddon",
|
||||||
|
@ -28,7 +28,7 @@ It should be written in the `kebab-case` format, meaning lowercase only and usin
|
||||||
|
|
||||||
### version
|
### 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.
|
as they are used to compare versions.
|
||||||
|
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
@ -48,7 +48,7 @@ This is an array of [relation objects](relation.md) which represent addons in re
|
||||||
### flags
|
### flags
|
||||||
|
|
||||||
This is an array of [flags](../flags.md) for this version.
|
This is an array of [flags](../flags.md) for this version.
|
||||||
|
|
||||||
### repositories
|
### repositories
|
||||||
|
|
||||||
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or
|
This is an array of [repository objects](repository.md). Each repository object defines one repository from which files or
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# AddonScript Object
|
# AddonScript Object
|
||||||
|
|
||||||
``` json
|
```json
|
||||||
{
|
{
|
||||||
"version": 2
|
"version": 2
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,8 @@ Future fields may be added.
|
||||||
# Required properties
|
# Required properties
|
||||||
|
|
||||||
## version
|
## version
|
||||||
|
|
||||||
This is the version of the addonscript format the file is written in.
|
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,
|
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.
|
and doesn't have to be (and shouldn't be) implemented by tools using addonscript.
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@ cannot be referenced, as only addon-ids are used.
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
|
<!-- prettier-ignore -->
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"companion": [
|
"companion": [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# File Object
|
# File Object
|
||||||
|
|
||||||
``` json
|
```json
|
||||||
{
|
{
|
||||||
"id": "modfile",
|
"id": "modfile",
|
||||||
"url": "https://example.com/mymod.jar",
|
"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.
|
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-->
|
<!--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,
|
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,
|
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.
|
in which case the next one will be used as a fallback.
|
||||||
|
|
||||||
### url
|
### 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
|
### install
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,37 @@
|
||||||
# Meta Object
|
# Meta Object
|
||||||
|
|
||||||
``` json
|
```json
|
||||||
{
|
{
|
||||||
"addon": {
|
"addon": {
|
||||||
"name": "My cool addon name",
|
"name": "My cool addon name",
|
||||||
"icon": "./icon.png",
|
"icon": "./icon.png",
|
||||||
"description":"./README.md",
|
"description": "./README.md",
|
||||||
"summary": "My Addon",
|
"summary": "My Addon",
|
||||||
"website": "https://example.com",
|
"website": "https://example.com",
|
||||||
"source": "https://gitea.com/user/myaddon",
|
"source": "https://gitea.com/user/myaddon",
|
||||||
"issues": "https://gitea.com/user/myaddon/issues",
|
"issues": "https://gitea.com/user/myaddon/issues",
|
||||||
"contributors": ["Alice", "Bob"]
|
"contributors": ["Alice", "Bob"]
|
||||||
},
|
},
|
||||||
"version": {
|
"version": {
|
||||||
"changelog": "./CHANGELOG.md",
|
"changelog": "./CHANGELOG.md",
|
||||||
"timestamp": 1594753200
|
"timestamp": 1594753200
|
||||||
},
|
},
|
||||||
"additional": {}
|
"additional": {}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
|
||||||
### addon
|
### addon
|
||||||
|
|
||||||
An [addon mata](#addon-meta-object) object.
|
An [addon mata](#addon-meta-object) object.
|
||||||
|
|
||||||
### version
|
### version
|
||||||
|
|
||||||
A [version mata](#version-meta-object) object.
|
A [version mata](#version-meta-object) object.
|
||||||
|
|
||||||
### additional
|
### additional
|
||||||
|
|
||||||
This object can contain any arbitrary data,
|
This object can contain any arbitrary data,
|
||||||
|
|
||||||
# Addon Meta Object
|
# Addon Meta Object
|
||||||
|
@ -36,29 +39,37 @@ This object can contain any arbitrary data,
|
||||||
## Optional Properties
|
## Optional Properties
|
||||||
|
|
||||||
### name
|
### name
|
||||||
|
|
||||||
The full, human-readable name of the addon. This is what a program such as a launcher should
|
The full, human-readable name of the addon. This is what a program such as a launcher should
|
||||||
display to the user.
|
display to the user.
|
||||||
|
|
||||||
### icon
|
### icon
|
||||||
|
|
||||||
A path to the icon of the addon. This path should point to an image file of small resolution
|
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.
|
which is ideally square. It can be dispayed to users in programs.
|
||||||
|
|
||||||
### description
|
### description
|
||||||
|
|
||||||
A path to a description file for the addon. The file should be in CommonMark markdown.
|
A path to a description file for the addon. The file should be in CommonMark markdown.
|
||||||
|
|
||||||
### summary
|
### summary
|
||||||
|
|
||||||
A short description of the addon, to be shown in lists and menus where the addon is shown aside others.
|
A short description of the addon, to be shown in lists and menus where the addon is shown aside others.
|
||||||
|
|
||||||
### website
|
### website
|
||||||
|
|
||||||
A URL to a website about the addon
|
A URL to a website about the addon
|
||||||
|
|
||||||
### source
|
### source
|
||||||
|
|
||||||
A URL to the source code of the addon.
|
A URL to the source code of the addon.
|
||||||
|
|
||||||
### issues
|
### issues
|
||||||
|
|
||||||
A URL to an issue tracker for the addon.
|
A URL to an issue tracker for the addon.
|
||||||
|
|
||||||
### contributors
|
### contributors
|
||||||
|
|
||||||
An array of people who have contributed to the addon.
|
An array of people who have contributed to the addon.
|
||||||
|
|
||||||
# Version Meta Object
|
# Version Meta Object
|
||||||
|
@ -66,7 +77,9 @@ An array of people who have contributed to the addon.
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
|
||||||
### changelog
|
### changelog
|
||||||
|
|
||||||
A path to a changelog file for the addon.
|
A path to a changelog file for the addon.
|
||||||
|
|
||||||
### timestamp
|
### timestamp
|
||||||
|
|
||||||
A unix timestamp of the time and date of the version's release.
|
A unix timestamp of the time and date of the version's release.
|
||||||
|
|
|
@ -14,11 +14,12 @@
|
||||||
|
|
||||||
### id
|
### 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
|
### version
|
||||||
|
|
||||||
<!--TODO: update link one PR is merged-->
|
<!--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.
|
This is a [semver version range](https://github.com/semver/semver/pull/584) of supported versions of this relation.
|
||||||
|
|
||||||
## Optional properties
|
## Optional properties
|
||||||
|
|
|
@ -20,7 +20,7 @@ This is the type of the repository. Possible values are [`api`](../repository/ap
|
||||||
|
|
||||||
### url
|
### url
|
||||||
|
|
||||||
This is the base URL of the repository. While other URLs in AddonScript can have different schemes,
|
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`.
|
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
|
If it is a maven repository the scheme can also be `file`, where
|
||||||
it points to a directory, which contains the maven repository.
|
it points to a directory, which contains the maven repository.
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Requires the prettier formatter. This should always be run before committing (looking at you, tilera!)
|
# Requires the prettier formatter. This should always be run before committing (looking at you, tilera!)
|
||||||
prettier --write ./**/*.md
|
prettier --write $(find -name "*.md")
|
||||||
|
|
Loading…
Reference in a new issue