forked from addonscript/addonscript-spec
Added URL scheme and packaging specifications
This commit is contained in:
parent
fcc0e01e02
commit
08b387b573
7 changed files with 47 additions and 3 deletions
|
@ -15,4 +15,9 @@
|
|||
# Concepts
|
||||
- [Installing](install.md)
|
||||
- [Flags](flags.md)
|
||||
- [URLs](url.md)
|
||||
|
||||
#Packaging
|
||||
- [Packaging](packaging/README.md)
|
||||
- [Zip-based Packaging](packaging/zip.md)
|
||||
|
||||
|
|
2
docs/namespaces.md
Normal file
2
docs/namespaces.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Addon IDs and Namespaces
|
||||
|
5
docs/packaging/README.md
Normal file
5
docs/packaging/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Packaging
|
||||
|
||||
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).
|
||||
|
8
docs/packaging/zip.md
Normal file
8
docs/packaging/zip.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Zip Packaging
|
||||
|
||||
With zip packaging, the AddonScript file and the associated files are contained in
|
||||
a zip file. The AddonScript file has to be called `addon.json` and can either be placed
|
||||
at the root of the zip file or, if there is just one directory in the root of the zip file,
|
||||
in this directory. All files and directories inside the zip file can be accessed from AddonScript
|
||||
using the [file URL scheme](../url.md). The path from the file URL is relative to the location of
|
||||
the AddonScript file.
|
|
@ -24,7 +24,7 @@ in which case the next one will be used as a fallback.
|
|||
|
||||
### url
|
||||
|
||||
This is URL, which points to the actual file. The URL can have one of the schemes listed [here](../schemes.md).
|
||||
This is an [URL](../url.md), which points to the actual file.
|
||||
|
||||
### install
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
### versions
|
||||
|
||||
This is an object, with version numbers as keys and URLs to AddonScript files as values. The AddonScript file which the URL
|
||||
This is an object, with version numbers as keys and [URLs](../url.md) to AddonScript files as values. The AddonScript file which the URL
|
||||
points to must include the version number, which is the key in the map, and its addon ID must match the addon ID of the AddonScript
|
||||
file which includes the index object.
|
||||
|
||||
### addons
|
||||
|
||||
This is an object, with addon IDs as keys and URLs to AddonScript files as values. The addon ID of the AddonScript file, to
|
||||
This is an object, with addon IDs as keys and [URLs](../url.md) to AddonScript files as values. The addon ID of the AddonScript file, to
|
||||
which the URL points, must match the key in the map.
|
||||
|
|
24
docs/url.md
Normal file
24
docs/url.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# URLs
|
||||
|
||||
AddonScript uses URLs to point to specific files. AddonScript specifies three URL schemes, which can be used
|
||||
to point to files.
|
||||
|
||||
## http(s)
|
||||
```https://example.com/file.jar```
|
||||
|
||||
This URL scheme is mostly self-explaining. It is jsut a simple http or https URL, which points to
|
||||
a file on a http server.
|
||||
|
||||
## mvn
|
||||
```mvn://com.example/someartifact/1.0/core.jar```
|
||||
|
||||
This URL scheme is used, to point to a maven artifact. The URL consists of multiple parts.
|
||||
In this example `com.example` it the namespace of the artifact, `someartifact` is the artifact ID,
|
||||
`1.0` is the version, `core` is an optional specifier and `.jar` is the file ending.
|
||||
`mvn://com.example/someartifact/1.0.jar` would also be a valid URL without an optional specifier.
|
||||
|
||||
## file
|
||||
```file://relative/path/to/file.jar```
|
||||
|
||||
This URL scheme is a relative path to a file. It can only be used with [packaging](packaging/README.md)
|
||||
or in some third-party environments, which are not covered by this specification.
|
Loading…
Reference in a new issue