-
Notifications
You must be signed in to change notification settings - Fork 1
/
GraphQLConfigure.js
61 lines (47 loc) · 1.56 KB
/
GraphQLConfigure.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*global define, $, _, window, app, type, document */
define(function(require, exports, module) {
"use strict";
var AppInit = app.getModule("utils/AppInit"),
Core = app.getModule("core/Core"),
PreferenceManager = app.getModule("core/PreferenceManager");
var preferenceId = "graphql";
var graphqlConfigure = {
"graphql.gen.nodeserver": {
text: "GraphQL generator settings",
type: "Section"
},
"graphql.gen.gqDoc": {
text: "GraphQL comments",
description: "Generate GraphQL IDL comments.",
type: "Check",
default: true
},
"graphql.gen.indentSpaces": {
text: "Indent Spaces",
description: "Number of spaces for indentation.",
type: "Number",
default: 4
},
"graphql.gen.debug": {
text: "Debug on console",
description: "Output debug information on Console",
type: "Check",
default: false
},
};
function getId() {
return preferenceId;
}
function getGenOptions() {
return {
gqDoc: PreferenceManager.get("graphql.gen.gqDoc"),
indentSpaces: PreferenceManager.get("graphql.gen.indentSpaces"),
debug: PreferenceManager.get("graphql.gen.debug")
};
}
AppInit.htmlReady(function() {
PreferenceManager.register(preferenceId, "GraphQL", graphqlConfigure);
});
exports.getId = getId;
exports.getGenOptions = getGenOptions;
});