Skip to content

Commit b3177fa

Browse files
author
angelozerr
committed
Provide typings.json editor.
1 parent 6b5f464 commit b3177fa

File tree

6 files changed

+106
-7
lines changed

6 files changed

+106
-7
lines changed

eclipse/json/ts.eclipse.ide.json.core/plugin.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ pluginName=TypeScript JSON Core
1313

1414
jsconfig_Content_Type_Extension_Element.name=jsconfig
1515
tsconfig_Content_Type_Extension_Element.name=tsconfig
16-
tslint_Content_Type_Extension_Element.name=tslint
16+
tslint_Content_Type_Extension_Element.name=tslint
17+
typings_Content_Type_Extension_Element.name=typings

eclipse/json/ts.eclipse.ide.json.core/plugin.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,31 @@
66
<content-type
77
file-names="jsconfig.json"
88
priority="high"
9-
name="%jsconfig_Content_Type_Extension_Element"
9+
name="%jsconfig_Content_Type_Extension_Element.name"
1010
id="ts.eclipse.ide.json.core.jsconfigsource"
1111
base-type="org.eclipse.wst.json.core.jsonsource">
1212
</content-type>
1313
<content-type
1414
file-names="tsconfig.json"
1515
priority="high"
16-
name="%tsconfig_Content_Type_Extension_Element"
16+
name="%tsconfig_Content_Type_Extension_Element.name"
1717
id="ts.eclipse.ide.json.core.tsconfigsource"
1818
base-type="org.eclipse.wst.json.core.jsonsource">
1919
</content-type>
2020
<content-type
2121
file-names="tslint.json"
2222
priority="high"
23-
name="%tslint_Content_Type_Extension_Element"
23+
name="%tslint_Content_Type_Extension_Element.name"
2424
id="ts.eclipse.ide.json.core.tslintsource"
2525
base-type="org.eclipse.wst.json.core.jsonsource">
2626
</content-type>
27+
<content-type
28+
file-names="typings.json"
29+
priority="high"
30+
name="%typings_Content_Type_Extension_Element.name"
31+
id="ts.eclipse.ide.json.core.typingssource"
32+
base-type="org.eclipse.wst.json.core.jsonsource">
33+
</content-type>
2734
</extension>
2835

2936
<!-- See http://schemastore.org/api.html and https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json -->
@@ -39,7 +46,12 @@
3946
description="JSON schema for the TSLint configuration files"
4047
fileMatch="tslint.json"
4148
url="http://json.schemastore.org/tslint"
42-
uri="schemastore/tslint-neon" />
49+
uri="schemastore/tslint-neon" />
50+
<schema name="typings.json"
51+
description="JSON schema for the typings configuration files"
52+
fileMatch="typings.json"
53+
url="http://json.schemastore.org/typings"
54+
uri="schemastore/typings" />
4355
</schemaCatalogContribution>
4456
</extension>
4557

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema",
3+
"title": "JSON schema for Typings TypeScript definitions manager",
4+
5+
"type": "object",
6+
"additionalProperties": true,
7+
"properties": {
8+
"main": {
9+
"description": "The entry point to the definition (canonical to `\"main\"` in NPM's `package.json`).",
10+
"type": "string"
11+
},
12+
"browser": {
13+
"description": "A string, or map of paths, to override during resolution. See spec: https://github.com/defunctzombie/package-browser-field-spec",
14+
"type": [ "object", "string" ]
15+
},
16+
"version": {
17+
"description": "The semver range this definition is typed for",
18+
"type": "string"
19+
},
20+
"files": {
21+
"description": "Used as an alternative or to complement `main`, specify an array of files that are exported but aren't already part of the resolution from `main`.",
22+
"type": "array",
23+
"items": { "type": "string" }
24+
},
25+
"global": {
26+
"description": "Denote that this definition _must_ be installed as global.",
27+
"type": "boolean"
28+
},
29+
"postmessage": {
30+
"description": "A message to emit to users after typings installation.",
31+
"type": "string"
32+
},
33+
"name": {
34+
"description": "The name of the definition",
35+
"type": "string"
36+
},
37+
"dependencies": {
38+
"description": "A map of dependencies required by the project.",
39+
"type": "object",
40+
"additionalProperties": {
41+
"type": "string"
42+
}
43+
},
44+
"devDependencies": {
45+
"description": "A map of dependencies required by the project during development.",
46+
"type": "object",
47+
"additionalProperties": {
48+
"type": "string"
49+
}
50+
},
51+
"peerDependencies": {
52+
"description": "A map of dependencies expected in the parent project for this dependency to work.",
53+
"type": "object",
54+
"additionalProperties": {
55+
"type": "string"
56+
}
57+
},
58+
"globalDependencies": {
59+
"description": "A map of global dependencies required by the project.",
60+
"type": "object",
61+
"additionalProperties": {
62+
"type": "string"
63+
}
64+
},
65+
"globalDevDependencies": {
66+
"description": "A map of global dependencies required by the project during development.",
67+
"type": "object",
68+
"additionalProperties": {
69+
"type": "string"
70+
}
71+
}
72+
}
73+
}
704 Bytes
Loading

eclipse/json/ts.eclipse.ide.json.ui/plugin.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ pluginName=Eclipse TypeScript Editors and Tools
1313

1414
jsconfig_Editor.name=JSConfig Editor
1515
tsconfig_Editor.name=TSConfig Editor
16-
tslint_Editor.name=TSLint Editor
16+
tslint_Editor.name=TSLint Editor
17+
typings_Editor.name=Typings Editor

eclipse/json/ts.eclipse.ide.json.ui/plugin.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,19 @@
3737
contentTypeId="ts.eclipse.ide.json.core.tslintsource" />
3838
</editor>
3939
</extension>
40-
40+
41+
<extension point="org.eclipse.ui.editors">
42+
<editor
43+
name="%typings_Editor.name"
44+
icon="$nl$/icons/full/obj16/typings-16.png"
45+
class="org.eclipse.wst.sse.ui.StructuredTextEditor"
46+
symbolicFontName="org.eclipse.wst.sse.ui.textfont"
47+
id="ts.eclipse.ide.json.ui.TypingsEditor">
48+
<contentTypeBinding
49+
contentTypeId="ts.eclipse.ide.json.core.typingssource" />
50+
</editor>
51+
</extension>
52+
4153
<!-- Custom completion for dependency key/value for
4254
"dependencies" and "devDependencies" JSON node
4355
of package.json-->

0 commit comments

Comments
 (0)