Skip to content

Commit 272fa2f

Browse files
committed
feat: sublime support
- reverted commenting changes - sublime support - renamed files to include `tmLanguage` - updated GA to export `.json` file
1 parent 2742e97 commit 272fa2f

12 files changed

+734
-605
lines changed

Diff for: .github/workflows/vscode.yml renamed to .github/workflows/publish.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
pull_request:
55
branches: [ main ]
66
paths:
7-
- "mcfunction.json"
7+
- "mcfunction.tmLanguage.yaml"
88
push:
99
branches: [ main ]
1010
tags: ["v*.*.*"]
1111
paths:
12-
- "mcfunction.json"
12+
- "mcfunction.tmLanguage.yaml"
1313

1414
jobs:
1515
ci:
@@ -29,17 +29,35 @@ jobs:
2929
node-version: 20.x
3030
cache: npm
3131

32-
- name: Install VSCE and package
32+
- name: Install npm stuff
3333
run: |
3434
npm install -g @vscode/vsce
35-
vsce package
35+
npm install -g js-yaml
36+
37+
- name: Export JSON from YAML
38+
run: js-yaml mcfunction.tmLanguage.yaml > mcfunction.tmLanguage.json
39+
40+
- name: Push JSON to repo for sublime
41+
if: github.ref == 'refs/heads/main'
42+
run: |
43+
git config --global user.name "github-actions"
44+
git config --global user.email "[email protected]"
45+
git add mcfunction.tmLanguage.json
46+
git commit -m "🤖 Generate JSON"
47+
git push origin main
48+
49+
- name: Package VSCode Ext
50+
run: vsce package
3651

3752
- name: Archive production artifacts
3853
uses: actions/upload-artifact@v3
3954
if: "!startsWith(github.ref, 'refs/tags/')"
4055
with:
4156
name: dist-without-markdown
42-
path: "*.vsix"
57+
path: |
58+
"*.vsix"
59+
"mcfunction.tmLanguage.yaml"
60+
"mcfunction.tmLanguage.json"
4361
4462
- name: Release
4563
uses: softprops/action-gh-release@v1

Diff for: CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v0.3.0
4+
5+
- Added support for Sublime Text
6+
- Reverted commenting changes from last release
7+
- This caused issues when you commented out normal code
8+
- Slightly restructured GA + some naming
9+
310
## v0.2.0
411

512
Refactor and additions to qualify for a `mcfunction` language
@@ -10,4 +17,4 @@ Refactor and additions to qualify for a `mcfunction` language
1017

1118
## v0.1.0
1219

13-
Initial release for the `bolt` community with major support for multiline commands
20+
Initial release for the `bolt` community with major support for multiline commands

Diff for: README.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,27 @@ The aim of this repo is to provide a general, feature complete language spec for
1616
- [ ] Fix issues on resource names versus keywords
1717
- [ ] Likely will need to combine them to some extent
1818

19-
## Download
19+
## Installing
2020

21-
Checkout the latest releases [here](https://github.com/rx-modules/language-mcfunction/releases).
21+
### VSCode
2222

23-
Proper releases to VSCode, Sublime Text, and other text editors *coming soon*!
23+
1. Grab the `.vsix` extension from [here](https://github.com/rx-modules/language-mcfunction/releases).
24+
2. Drag and drop it into VSCode (any folder).
25+
3. Right click the file and click "Install Extension VSIX".
26+
27+
*Marketplace coming soon*
28+
29+
### Sublime Text
30+
31+
It is recommended you use [Package Control](https://packagecontrol.io/) to manage the package:
32+
33+
1. [Install Package Control](https://packagecontrol.io/installation) if it is not already present.
34+
2. Run the `Package Control: Add Repository` [command](https://packagecontrol.io/docs/usage) and enter `https://github.com/rx-modules/language-mcfunction` to add the repository as a package.
35+
3. Run the `Package Control: Install Package` and search for `language-mcfunction` to install it as you would a normal package.
36+
37+
This will keep the package updated with the repository automatically.
38+
39+
Otherwise you can clone the repository into user packages (e.g. `%appdata%\Sublime Text 3\Packages`) and update it manually.
2440

2541
## Acknowledgements
2642

Diff for: icon.png

1.94 KB
Loading

0 commit comments

Comments
 (0)