Skip to content

Commit afd8496

Browse files
committed
initial commit
1 parent 99b0927 commit afd8496

File tree

5 files changed

+140
-0
lines changed

5 files changed

+140
-0
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
max_line_length = 120
11+
12+
[*.{svg,gif,png,jpg,jpeg}]
13+
insert_final_newline = false
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
###############################################################################
3+
# Set default behavior to automatically normalize line endings.
4+
###############################################################################
5+
* text=auto eol=lf
6+
7+
8+
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
9+
# in Windows via a file share from Linux, the scripts will work.
10+
*.{cmd,[cC][mM][dD]} text eol=crlf
11+
*.{bat,[bB][aA][tT]} text eol=crlf
12+
13+
14+
# Force bash scripts to always use lf line endings so that if a repo is accessed
15+
# in Unix via a file share from Windows, the scripts will work.
16+
*.sh text eol=lf

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
*.tsbuildinfo
3+
.npm
4+
.eslintcache
5+
dist
6+
out
7+
node_modules

.vscode/settings.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"[json]": {
3+
"editor.quickSuggestions": {
4+
"strings": true
5+
},
6+
"editor.suggest.insertMode": "replace",
7+
"gitlens.codeLens.scopes": [
8+
"document"
9+
],
10+
"editor.defaultFormatter": "vscode.json-language-features"
11+
},
12+
"[jsonc]": {
13+
"editor.quickSuggestions": {
14+
"strings": true
15+
},
16+
"editor.suggest.insertMode": "replace",
17+
"gitlens.codeLens.scopes": [
18+
"document"
19+
],
20+
"editor.defaultFormatter": "vscode.json-language-features"
21+
}
22+
}

src/schema/cnccodes.schema.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "G/M Code Dictionary",
4+
"description": "JSON Schema for CNC G & M Codes",
5+
"type": "object",
6+
"required": [
7+
"type",
8+
"machineType",
9+
"title"
10+
],
11+
"properties": {
12+
"$schema": {
13+
"description": "Link to this schema",
14+
"type": "string"
15+
},
16+
"type": {
17+
"description": "The type of code (G or M)",
18+
"type": "string",
19+
"enum": [
20+
"gcode",
21+
"mcode"
22+
]
23+
},
24+
"machineType": {
25+
"description": "The type of CNC machine",
26+
"type": "string",
27+
"enum": [
28+
"mill",
29+
"lathe",
30+
"3dprinter"
31+
]
32+
},
33+
"title": {
34+
"description": "Descriptive title of the JSON",
35+
"type": "string"
36+
},
37+
"codes": {
38+
"description": "Individual G-Codes",
39+
"type": "object",
40+
"patternProperties": {
41+
"^G|^M": {
42+
"type": "object",
43+
"properties": {
44+
"category": {
45+
"description": "Category for the code",
46+
"type": "string",
47+
"enum": [
48+
"motion",
49+
"coordinate",
50+
"compensation",
51+
"canned",
52+
"other"
53+
]
54+
},
55+
"modal": {
56+
"description": "Modal / Non-Modal (boolean)",
57+
"type": "boolean"
58+
},
59+
"shortDesc": {
60+
"description": "A short description of the code",
61+
"type": "string"
62+
},
63+
"desc": {
64+
"description": "A longer description with markdown formatting",
65+
"type": "string"
66+
}
67+
},
68+
"additionalProperties": false,
69+
"required": [
70+
"category",
71+
"modal"
72+
]
73+
},
74+
"additionalProperties": false
75+
}
76+
}
77+
},
78+
"additionalProperties": false
79+
}

0 commit comments

Comments
 (0)