@spyglassmc/json 0.3.31 → 0.3.32
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/lib/index.d.ts +5 -1
- package/lib/index.js +24 -17
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -5,5 +5,9 @@ export * as completer from './completer/index.js';
|
|
|
5
5
|
export * as formatter from './formatter/index.js';
|
|
6
6
|
export * from './node/index.js';
|
|
7
7
|
export * as parser from './parser/index.js';
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param jsonUriPredicate If provided, JSON file URIs must pass this predicate for them to be of
|
|
10
|
+
* proper `json` language.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getInitializer(jsonUriPredicate?: core.UriPredicate): core.SyncProjectInitializer;
|
|
9
13
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -10,21 +10,28 @@ export * as completer from './completer/index.js';
|
|
|
10
10
|
export * as formatter from './formatter/index.js';
|
|
11
11
|
export * from './node/index.js';
|
|
12
12
|
export * as parser from './parser/index.js';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
13
|
+
/**
|
|
14
|
+
* @param jsonUriPredicate If provided, JSON file URIs must pass this predicate for them to be of
|
|
15
|
+
* proper `json` language.
|
|
16
|
+
*/
|
|
17
|
+
export function getInitializer(jsonUriPredicate) {
|
|
18
|
+
return ({ meta }) => {
|
|
19
|
+
meta.registerLanguage('json', {
|
|
20
|
+
extensions: ['.json'],
|
|
21
|
+
uriPredicate: jsonUriPredicate,
|
|
22
|
+
triggerCharacters: ['\n', ':', '"'],
|
|
23
|
+
parser: parser.file,
|
|
24
|
+
});
|
|
25
|
+
meta.registerLanguage('mcmeta', {
|
|
26
|
+
extensions: ['.mcmeta'],
|
|
27
|
+
triggerCharacters: ['\n', ':', '"'],
|
|
28
|
+
parser: parser.file,
|
|
29
|
+
});
|
|
30
|
+
meta.registerParser('json:entry', parser.entry);
|
|
31
|
+
checker.register(meta);
|
|
32
|
+
colorizer.register(meta);
|
|
33
|
+
completer.register(meta);
|
|
34
|
+
formatter.register(meta);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
30
37
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/json",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/SpyglassMC/Spyglass/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@spyglassmc/core": "0.4.
|
|
29
|
-
"@spyglassmc/locales": "0.3.
|
|
30
|
-
"@spyglassmc/mcdoc": "0.3.
|
|
28
|
+
"@spyglassmc/core": "0.4.28",
|
|
29
|
+
"@spyglassmc/locales": "0.3.14",
|
|
30
|
+
"@spyglassmc/mcdoc": "0.3.32"
|
|
31
31
|
}
|
|
32
32
|
}
|