@bedrock-oss/add-on-registry 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
- package/registry.js +4 -0
- package/types.d.ts +4 -4
package/README.md
CHANGED
|
@@ -11,18 +11,18 @@ Your pull-request will automatically merge all JSON files together into one file
|
|
|
11
11
|
|
|
12
12
|
### Steps
|
|
13
13
|
|
|
14
|
-
1. Create a new JSON file or edit one inside the `/registry` folder.
|
|
15
|
-
|
|
14
|
+
1. Create a new JSON file or edit one inside the `/registry` folder.
|
|
15
|
+
- If you're a "new" creator, the filename should be your creator/studio name (e.g. `ascent.json`, `spark.json`).
|
|
16
16
|
2. Follow the structure used in the other files. Example:
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
```json
|
|
19
19
|
{
|
|
20
20
|
"ascent_paint": {
|
|
21
21
|
"name": "Paint",
|
|
22
22
|
"creator": "ASCENT"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
```
|
|
26
26
|
|
|
27
27
|
3. Commit your JSON file, then open a pull request.
|
|
28
28
|
|
|
@@ -45,7 +45,7 @@ npm i @bedrock-oss/add-on-registry
|
|
|
45
45
|
You can now use it in your project like this:
|
|
46
46
|
|
|
47
47
|
```javascript
|
|
48
|
-
import { Registry } from "@bedrock-oss/add-on-registry"
|
|
48
|
+
import { Registry } from "@bedrock-oss/add-on-registry";
|
|
49
49
|
|
|
50
50
|
function getAddOnName(identifier) {
|
|
51
51
|
const namespace = identifier.split(":")[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock-oss/add-on-registry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "A registry for Minecraft Bedrock Add-Ons and their basic meta-data. This is intended to be used by features such as WAILA-add-ons to display accurate information about packs.",
|
|
5
5
|
"main": "registry.js",
|
|
6
6
|
"type": "module",
|
package/registry.js
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface RegistryEntry {
|
|
2
|
-
name: string
|
|
3
|
-
creator: string
|
|
2
|
+
name: string;
|
|
3
|
+
creator: string;
|
|
4
4
|
}
|
|
5
|
-
type RegistryMap = Record<string, RegistryEntry
|
|
6
|
-
export const Registry: RegistryMap
|
|
5
|
+
type RegistryMap = Record<string, RegistryEntry>;
|
|
6
|
+
export const Registry: RegistryMap;
|