Skip to content
This repository was archived by the owner on Aug 16, 2020. It is now read-only.

Commit 6307884

Browse files
committed
✨ Change into an npm package
1 parent 589de61 commit 6307884

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6500
-4
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
/utils/registries.json

.npmignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.circleci
2+
/.vscode
3+
/node_modules
4+
/playground
5+
/utils
6+
/.gitignore
7+
/.releaserc.json
8+
/.renovaterc.json
9+
/.vscodeignore
10+
/icon.png

.releaserc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
"assets": "datapack-helper-plus-json.vsix"
1515
}
1616
],
17+
"@semantic-release/npm",
1718
[
1819
"@semantic-release/git",
1920
{
2021
"message": ":bookmark: v${nextRelease.version}\n\n[skip ci]\n\nhttps://github.com/SPGoding/vscode-datapack-helper-plus-json/releases/tag/${nextRelease.gitTag}"
2122
}
2223
]
2324
]
24-
}
25+
}

.vscode/settings.json

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"json.schemas": [
3+
{
4+
"fileMatch": [
5+
"playground/pack.mcmeta"
6+
],
7+
"url": "./src/pack.mcmeta.json"
8+
},
9+
{
10+
"fileMatch": [
11+
"playground/advancements/**.json"
12+
],
13+
"url": "./src/advancement.json"
14+
},
15+
{
16+
"fileMatch": [
17+
"playground/loot_tables/**.json"
18+
],
19+
"url": "./src/loot_table.json"
20+
},
21+
{
22+
"fileMatch": [
23+
"playground/predicates/**.json"
24+
],
25+
"url": "./src/predicate.json"
26+
},
27+
{
28+
"fileMatch": [
29+
"playground/recipes/**.json"
30+
],
31+
"url": "./src/recipe.json"
32+
},
33+
{
34+
"fileMatch": [
35+
"playground/tags/blocks/**.json"
36+
],
37+
"url": "./src/tags/block.json"
38+
},
39+
{
40+
"fileMatch": [
41+
"playground/tags/entity_types/**.json"
42+
],
43+
"url": "./src/tags/entity_type.json"
44+
},
45+
{
46+
"fileMatch": [
47+
"playground/tags/fluids/**.json"
48+
],
49+
"url": "./src/tags/fluid.json"
50+
},
51+
{
52+
"fileMatch": [
53+
"playground/tags/functions/**.json"
54+
],
55+
"url": "./src/tags/function.json"
56+
},
57+
{
58+
"fileMatch": [
59+
"playground/tags/items/**.json"
60+
],
61+
"url": "./src/tags/item.json"
62+
}
63+
],
64+
"files.associations": {
65+
"*.mcmeta": "json"
66+
}
67+
}

README.md

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# vscode-datapack-helper-plus-json
22

33
[![CircleCI](https://img.shields.io/circleci/build/github/SPGoding/vscode-datapack-helper-plus-json.svg?logo=circleci&style=flat-square)](https://circleci.com/gh/SPGoding/vscode-datapack-helper-plus-json)
4+
[![npm](https://img.shields.io/npm/v/datapack-helper-plus-json.svg?logo=npm&style=flat-square)](https://npmjs.com/package/datapack-helper-plus-json)
45
[![VSCode Marketplace](https://img.shields.io/visual-studio-marketplace/v/SPGoding.datapack-helper-plus-json.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=SPGoding.datapack-helper-plus-json)
56
[![VSCode Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/SPGoding.datapack-helper-plus-json.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=SPGoding.datapack-helper-plus-json)
67
[![VSCode Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/SPGoding.datapack-helper-plus-json.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=SPGoding.datapack-helper-plus-json)
@@ -10,6 +11,33 @@
1011
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
1112
[![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square)](https://gitmoji.carloscuesta.me/)
1213

13-
A VSCode extension providing JSON validations for Minecraft: Java Edition datapacks.
14+
Update to: Minecraft Java Edition 19w38b
1415

15-
All JSON Schema files are from NPM package datapack-json-schemas ([npm](https://www.npmjs.com/package/datapack-json-schemas) | [GitHub](https://github.com/SPGoding/datapack-json-schemas)).
16+
JSON schemas for Minecraft: Java Edition datapack JSON files. Information about json schemas can be found at [json-schema.org](http://json-schema.org/).
17+
18+
## Design choices
19+
20+
- The use of the `minecraft:` namespace is mandatory anywhere it can be used.
21+
This does mean that it will not necessarily validate against all vanilla
22+
files
23+
24+
## File Struture
25+
26+
- `src`: Stores all JSON Schemas.
27+
- `shared`: Stores all common JSON Schemas. Some of them are generated by `./scripts/convert.js` so you don't change them manually.
28+
- `tags`: Stores JSON Schemas for [tags](https://minecraft.gamepedia.com/Tag).
29+
- `advancement.json`: JSON Schema for [advancements](https://minecraft.gamepedia.com/Advancements).
30+
- `loot_table.json`: JSON Schema for [loot tables](https://minecraft.gamepedia.com/Loot_table).
31+
- `pack.mcmeta.json`: JSON Schema for [`pack.mcmeta`](https://minecraft.gamepedia.com/Data_pack#pack.mcmeta).
32+
- `predicate.json`: JSON Schema for [`predicates`](https://minecraft.gamepedia.com/Predicate).
33+
- `recipe.json`: JSON Schema for [recipes](https://minecraft.gamepedia.com/Recipe).
34+
- `scripts`: Stores useful tools.
35+
- `convert.js`: Convert `registries.json` generated by Minecraft data generator to `shared` files
36+
37+
## Special Thanks
38+
39+
This work is based on [Levertion/minecraft-json-schema](https://github.com/Levertion/minecraft-json-schema) created by [@Levertion](https://github.com/Levertion) which is released under a [CC BY 4.0 license](https://creativecommons.org/licenses/by/4.0/). I keep it updated with Minecraft.
40+
41+
## Contributing
42+
43+
Contributions are welcome!

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"icon": "icon.png",
8484
"scripts": {
8585
"commit": "gitmoji -c",
86+
"convert": "node ./utils/convert.js",
8687
"release": "semantic-release",
8788
"test": "echo \"Error: no test specified\" && exit 1"
8889
},

playground/advancements/test.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"criteria": {
3+
"c": {
4+
"trigger": "minecraft:placed_block",
5+
"conditions": {
6+
"block": "minecraft:acacia_button"
7+
}
8+
}
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"condition": "minecraft:location_check",
3+
"predicate": {
4+
"position": {
5+
"x": 1
6+
}
7+
}
8+
}

playground/predicates/test.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"condition": "minecraft:entity_properties",
3+
"entity": "this",
4+
"predicate": {
5+
"player": {
6+
"advancements": {
7+
"minecraft:a/b": {}
8+
}
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)