Skip to content

Commit 7305575

Browse files
committed
Merge branch 'release-0.6'
2 parents 41a2500 + 3873815 commit 7305575

Some content is hidden

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

48 files changed

+4399
-391
lines changed

.eslintignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
vscode.proposed.d.ts
21
out/*
3-
dist/*
2+
dist/*
3+
tsconfig.tsbuildinfo
4+
webpack.config.js

.vscode/launch.json

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,36 @@
33
"version": "0.2.0",
44
"configurations": [
55
{
6-
"name": "Run G-Code (Sandbox)",
7-
"type": "extensionHost",
6+
"name": "Run G-Code (Sandbox) - Samples",
7+
"type": "pwa-extensionHost",
88
"request": "launch",
99
"runtimeExecutable": "${execPath}",
1010
"args": [
1111
"--disable-extensions",
12-
"--extensionDevelopmentPath=${workspaceFolder}"
12+
"--extensionDevelopmentPath=${workspaceFolder}",
13+
"${workspaceFolder}/samplenc/sample-colors.nc",
14+
"${workspaceFolder}/samplenc/sample-profile.nc"
1315
],
14-
"stopOnEntry": false,
15-
"sourceMaps": true,
16-
"smartStep": true,
1716
"outFiles": [
18-
"${workspaceFolder}/out/**/*.js"
17+
"${workspaceFolder}/dist/**/*.js"
1918
],
20-
"preLaunchTask": "${defaultBuildTask}"
19+
"presentation": {
20+
"hidden": false,
21+
"group": "Launch Extension",
22+
"order": 1
23+
},
24+
"preLaunchTask": "npm: webpack",
25+
"skipFiles": [
26+
"<node_internals>/**",
27+
"**/node_modules/**"
28+
],
29+
"smartStep": true,
30+
"sourceMaps": true,
31+
"trace": true
2132
},
2233
{
23-
"name": "Run G-Code (Sandbox) - Open Samples",
24-
"type": "extensionHost",
34+
"name": "Run G-Code (Sandbox)",
35+
"type": "pwa-extensionHost",
2536
"request": "launch",
2637
"runtimeExecutable": "${execPath}",
2738
"args": [
@@ -30,31 +41,45 @@
3041
"${workspaceFolder}/samplenc/sample-colors.nc",
3142
"${workspaceFolder}/samplenc/sample-profile.nc"
3243
],
33-
"stopOnEntry": false,
34-
"sourceMaps": true,
35-
"smartStep": true,
3644
"outFiles": [
37-
"${workspaceFolder}/out/**/*.js"
45+
"${workspaceFolder}/dist/**/*.js"
46+
],
47+
"presentation": {
48+
"hidden": false,
49+
"group": "Launch Extension",
50+
"order": 2
51+
},
52+
"preLaunchTask": "npm: webpack",
53+
"skipFiles": [
54+
"<node_internals>/**",
55+
"**/node_modules/**"
3856
],
39-
"preLaunchTask": "${defaultBuildTask}"
57+
"smartStep": true,
58+
"sourceMaps": true,
59+
"trace": true
4060
},
4161
{
42-
"name": "Run G-Code Tests",
43-
"type": "extensionHost",
62+
"name": "G-Code Mocha Unit Tests",
63+
"type": "pwa-node",
4464
"request": "launch",
45-
"runtimeExecutable": "${execPath}",
65+
"internalConsoleOptions": "openOnSessionStart",
66+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
4667
"args": [
47-
"--disable-extensions",
48-
"--extensionDevelopmentPath=${workspaceFolder}",
49-
"--extensionsTestsPath=${workspaceFolder}/out/test/suite/index"
68+
"--no-timeouts",
69+
"--colors",
70+
"--require",
71+
"ts-node/register",
72+
"${workspaceFolder}/test/unit/*.test.ts"
5073
],
51-
"stopOnEntry": false,
52-
"sourceMaps": true,
53-
"smartStep": true,
54-
"outFiles": [
55-
"${workspaceFolder}/out/test/**/*.js"
74+
"skipFiles": [
75+
"<node_internals>/**",
76+
"**/node_modules/**"
5677
],
57-
"preLaunchTask": "${defaultBuildTask}"
78+
"env": {
79+
"NODE_ENV": "testing",
80+
"TS_NODE_PROJECT": "./tsconfig.tests.json"
81+
},
82+
"sourceMaps": true
5883
}
5984
]
6085
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
"typescript",
4242
"javascript"
4343
],
44-
"prettier.requireConfig": true
44+
"prettier.requireConfig": true,
4545
}

.vscode/tasks.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,33 @@
77
"problemMatcher": "$tsc-watch",
88
"isBackground": true,
99
"presentation": {
10-
"reveal": "never"
10+
"echo": true,
11+
"reveal": "never",
12+
"focus": false,
13+
"panel": "shared",
14+
"showReuseMessage": true,
15+
"clear": false
1116
},
1217
"group": {
1318
"kind": "build",
1419
"isDefault": true
1520
}
21+
},
22+
{
23+
"type": "npm",
24+
"script": "webpack",
25+
"problemMatcher": "$tsc-watch",
26+
"label": "npm: webpack",
27+
"detail": "webpack --mode development",
28+
"isBackground": true,
29+
"presentation": {
30+
"echo": true,
31+
"reveal": "always",
32+
"focus": false,
33+
"panel": "shared",
34+
"showReuseMessage": true,
35+
"clear": false
36+
}
1637
}
1738
]
1839
}

.vscode/vscode-gcode-syntax.code-snippets

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,27 @@
2727
" * -------------------------------------------------------------------------------------------- */"
2828
],
2929
"description": "Adds Copyright Header..."
30+
},
31+
"Issues Link": {
32+
"scope": "markdown",
33+
"prefix": [
34+
"issues",
35+
"gh",
36+
"ghissues",
37+
"link"
38+
],
39+
"body": "https://github.com/appliedengdesign/vscode-gcode-syntax/issues/$1",
40+
"description": "Insert link to GH issue"
41+
},
42+
"Tag Link": {
43+
"scope": "markdown",
44+
"prefix": [
45+
"tag",
46+
"ghtag",
47+
"release",
48+
"link"
49+
],
50+
"body": "(https://github.com/appliedengesign/vscode-gcode-syntax/releases/tag/$1",
51+
"description": "Insert link to release"
3052
}
3153
}

.vscodeignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@
44
.gitattributes
55
.github/**
66
.gitignore
7+
.markdownlint.json
78
.prettierignore
89
.prettierrc
910
.vscode-test/**
1011
.vscode/**
1112
**/*.map
1213
CODE_OF_CONDUCT.md
1314
CONTRIBUTING.md
14-
images/*.ai
15-
images/*.svg
15+
SECURITY.md
16+
CHANGELOG.md
17+
images/**
1618
LICENSE
17-
node_modules/**
1819
out/test/**
1920
package-lock.json
2021
samplenc/**
2122
src/**
2223
test/**
23-
tsconfig.json
24+
out/**
25+
tsconfig**
2426
tsconfig.tsbuildinfo
2527
webpack.config.js

CHANGELOG.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
# Change Log
22

3-
All changes to vscode-code-syntax will be documented here.
3+
All changes to G-Code Language Extension will be documented here.
4+
5+
## v0.6.0 [#](https://github.com/appliedengesign/vscode-gcode-syntax/releases/tag/v0.6.0)
6+
7+
### New Features
8+
9+
- Added new command that will turn selected text into a comment or revese (Available in Context menu)
10+
- Hover over G/M code to get a short description of the code (Relies on [gcode-reference](https://github.com/appliedengdesign/gcode-reference) package for info)
11+
- Machine Type selection in configuration selectively loads features
12+
- Machine Type shown in status bar
13+
- Added check for file over 10K lines, disables autorefresh of tree/stats, shows warning message ( [#23](https://github.com/appliedengdesign/vscode-gcode-syntax/issues/23))
14+
- Added `.g` extension ( [#24](https://github.com/appliedengdesign/vscode-gcode-syntax/issues/24) )
15+
16+
### Fixes
17+
18+
- Fixed block comment definition
19+
- Removed stats enable setting
20+
21+
### Other
22+
23+
- Updated package description & badges
24+
- Extension now packed with webpack for efficiency/speed
25+
- Created some Mocha Unit tests
26+
- Updated TypeScript config to use ES2020 and ESNext configuration
27+
- Updated all dependencies
28+
- Updated README
429

530
## v0.5.1 [#](https://github.com/appliedengesign/vscode-gcode-syntax/releases/tag/v0.5.1)
631

@@ -23,7 +48,7 @@ All changes to vscode-code-syntax will be documented here.
2348
- Added Units to Status Bar ( Can manually set or set to Auto to detect ```G20/G21```)
2449
- Added Configuration for Units, Status Bar
2550
- Added support status bar Icon
26-
- Added commands to status bar for Nav Tree Refresh
51+
- Added commands to context menu for Nav Tree Refresh
2752
- Added file extensions: `.aptcl`, `.gp`, `.msb`, `.ncd`, `.ncf`, `.nci`, `.pim`, `.pit`, `.pu1`, `.spf`
2853
- Added `G04` Dwell to Nav Tree
2954
- Added `G74`, `G81`, `G82`, `G83`, `G84`, `G85`, `G86`, `G87`, `G88`, `G89` cycles to Nav Tree

README.md

Lines changed: 61 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,55 @@ You can also subscribe to our videos over on [YouTube](https://youtube.com/c/App
3535

3636
This extension adds language syntax for CNC G-Code, code snippets, and colorization.
3737

38-
- Tree View
39-
- Tree View shows an overview of the operations in the G-Code Program
40-
- Stats View
41-
- Stats View shows a number of stats like tool changes, runtime, etc.
42-
- Status Bar messages about code status.
38+
### Tree View
4339

44-
### Current Supported File Extensions
40+
- Tree View shows an overview of the operations in the G-Code Program
41+
42+
![Tree Screenshot](https://raw.githubusercontent.com/appliedengdesign/vscode-gcode-syntax/master/images/tree-screenshot.png)
43+
44+
### Stats View
45+
46+
- Stats View shows a number of stats like tool changes, runtime, etc.
47+
48+
![Stats Screenshot](https://raw.githubusercontent.com/appliedengdesign/vscode-gcode-syntax/master/images/stats-screenshot.png)
49+
50+
### Hovers
51+
52+
- Hovering over G/M codes will show a short description of the code
53+
- Descriptions for the codes are taken from the sister project: [gcode-reference](https://github.com/appliedengdesign/gcode-reference)
54+
- Hovers are dependent on the machine type selected
55+
56+
![Hovers Screenshot](https://raw.githubusercontent.com/appliedengdesign/vscode-gcode-syntax/master/images/hovers-screenshot.png)
57+
58+
### Status Bars
59+
60+
- G-Code adds three informative sections to the VSCode status bar area
61+
- Tree Status (Dirty or Up to Date) depending on Refresh needed
62+
- Current units as set by settings (Auto, Inch or Metric)
63+
- Machine Type as set by settings
64+
- Ok there's a little heart there too.
65+
66+
![Status Bar Screenshot](https://raw.githubusercontent.com/appliedengdesign/vscode-gcode-syntax/master/images/statusbar-screenshot.png)
67+
68+
### Context Menu
69+
70+
- G-Code adds several commands to the context menu when viewing g-code
71+
- Change selected code into a comment
72+
- Refresh Stats
73+
- Refresh Tree
74+
- Remove Comment from selected code
75+
76+
![Context Menu Screenshot](https://raw.githubusercontent.com/appliedengdesign/vscode-gcode-syntax/master/images/context-menu-screenshot.png)
77+
78+
## Current Supported File Extensions
4579

4680
```text
47-
| .001 | .apt | .aptcl | .cls | .cnc | .din | .dnc | .ecs |
48-
| .eia | .fan | .fgc | .fnc | .g00 | .gc | .gcd | .gcode |
49-
| .gp | .hnc | .knc | .lib | .m | .min | .mpf | .mpr |
50-
| .msb | .nc | .ncc | .ncd | .ncf | .ncg | .nci | .ncp |
51-
| .ngc | .out | .pim | .pit | .plt | .ply | .prg | .pu1 |
52-
| .rol | .sbp | .spf | .ssb | .sub | .tap | .xpi | |
81+
| .001 | .apt | .aptcl | .cls | .cnc | .din | .dnc | .ecs |
82+
| .eia | .fan | .fgc | .fnc | .g | .g00 | .gc | .gcd |
83+
| .gcode | .gp | .hnc | .knc | .lib | .m | .min | .mpf |
84+
| .mpr | .msb | .nc | .ncc | .ncd | .ncf | .ncg | .nci |
85+
| .ncp | .ngc | .out | .pim | .pit | .plt | .ply | .prg |
86+
| .pu1 | .rol | .sbp | .spf | .ssb | .sub | .tap | .xpi |
5387
```
5488

5589
If you would like another file extension supported by this extension, please [open an issue](https://github.com/appliedemgdesign/issues).
@@ -68,24 +102,19 @@ Tree view is enabled by default and can be access from the G icon on the activit
68102

69103
G-Code Syntax is customizable and provides many configuration settings to allow the personalization of almost all features.
70104

71-
| Name | Description |
72-
| ------------------------------------- | ------------------------------------------------------------------------------------------- |
73-
| `gcode.general.machineType` | **( Not Currently Active )** |
74-
| | |
75-
| `gcode.general.statusBars.enabled` | Enable or Disable the G-Code status bars |
76-
| | |
77-
| `gcode.general.statusbars.alignment` | Choose the alignment of the status bars (Left is default) |
78-
| | |
79-
| `gcode.general.units` | Choose the units for the file. Options are Auto, Inch or Metric |
80-
| | |
81-
| `gcode.navTree.autoRefresh` | Tree auto-refreshes as changes are made to the g-code. ( Disabled by default ) |
82-
| | |
83-
| `gcode.stats.enabled` | Enable the statistics view. ( Disabled by default ) |
84-
| | |
85-
| `gcode.stats.autoRefresh` | Auto-refresh the stats view when changes are made to the g-code. (Disabled by default) |
86-
| | |
87-
88-
![Settings Screenshot](https://github.com/appliedengdesign/vscode-gcode-syntax/blob/master/images/settings-screenshot.png?raw=true)
105+
| Name | Description |
106+
| ------------------------------------ | -------------------------------------------------------------------------------------- |
107+
| `gcode.general.hovers.enabled` | Enable or Disable the hovers to show G-Code information |
108+
| `gcode.general.machineType` | Choose the machine type for extension (Mill is default) |
109+
| `gcode.general.statusBars.enabled` | Enable or Disable the G-Code status bars |
110+
| `gcode.general.statusbars.alignment` | Choose the alignment of the status bars (Left is default) |
111+
| `gcode.general.units` | Choose the units for the file. Options are Auto, Inch or Metric |
112+
| `gcode.views.maxAutoRefresh` | Value for limiting the autoRefresh maximum lines |
113+
| `gcode.views.navTree.autoRefresh` | Tree auto-refreshes as changes are made to the g-code. ( Disabled by default ) |
114+
| `gcode.views.stats.autoRefresh` | Auto-refresh the stats view when changes are made to the g-code. (Disabled by default) |
115+
| `gcode.views.webviews.enabled` | Enable or disable the webviews |
116+
117+
![Settings Screenshot](https://raw.githubusercontent.com/appliedengdesign/vscode-gcode-syntax/master/images/settings-screenshot.png)
89118

90119
## Known Issues
91120

@@ -96,7 +125,7 @@ Please visit our [GitHub Issues](https://github.com/appliedengdesign/vscode-gcod
96125
- Add more snippets
97126
- Add additional tree items.
98127
- More Statistics
99-
- Additional status bar messages
128+
- Line Numbering
100129
- G-Code Debugging
101130
- Backplotter
102131
- Semantic Highlighting
@@ -106,7 +135,7 @@ Visit our [projects page](https://github.com/appliedengdesign/vscode-gcode-synta
106135

107136
## Changelog
108137

109-
Latest Version: v0.5.1
138+
Latest Version: v0.6.0
110139

111140
Please refer to our [CHANGELOG](https://github.com/appliedengdesign/vscode-gcode-syntax/blob/master/CHANGELOG.md) doc.
112141

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Our team takes security bugs in our extension very seriously. We appreciate your
44

55
We try to keep all of the dependencies updated whenever possible.
66

7-
Because this is a plugin to VSCode, to report a security issue or vulnerability, please verify that the issue is with our plugin and if so, submit an [issue](https://github.com/appliedengdesign/vscode-gcode-syntax/issues), otherwise, submit an issue with the [VSCode project](https://github.com/microsoft/vscode).
7+
Because this is a plugin to VSCode, to report a security issue or vulnerability, please verify that the issue is with our plugin and if so, submit an [issue](https://github.com/appliedengdesign/vscode-gcode-syntax/issues), otherwise, submit an issue with the [VSCode project](https://github.com/microsoft/vscode).

images/context-menu-screenshot.png

23.5 KB
Loading

0 commit comments

Comments
 (0)