Skip to content

Commit d3507d4

Browse files
committed
Initial Release
1 parent 44e38c7 commit d3507d4

15 files changed

Lines changed: 1538 additions & 91 deletions

.github/Publish Pre-release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Pre-release Extension
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'main'
8+
paths:
9+
- '**.json'
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@master
16+
17+
- name: Install Dependencies
18+
run: | # vsce etc
19+
npm i
20+
21+
- name: Setup Github Actions
22+
run: | # allow use of `git push`
23+
git config --global user.name "RedCMD"
24+
git config --global user.email "theredcmd@gmail.com"
25+
git add .
26+
git diff-index --quiet HEAD || git commit -m "Sync Github Actions"
27+
28+
- name: Package Extension
29+
run: | # `.vsix` file
30+
npx vsce package patch --pre-release
31+
git push --tags
32+
echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_ENV"
33+
34+
- name: Generate Release
35+
run: | # create release page on github with `.vsix` file
36+
gh release create v$VERSION --generate-notes --prerelease json-embedded-languages-$VERSION.vsix
37+
env:
38+
GH_TOKEN: ${{ github.token }}
39+
40+
- name: Publish Pre-release
41+
run: | # upload to Extension Marketplace
42+
npx vsce publish --pre-release -p ${{ secrets.VSCE_PAT }} --packagePath json-embedded-languages-$VERSION.vsix
43+
git push

.github/Publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish Extension
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version'
8+
required: true
9+
default: 'minor x.1.0'
10+
type: choice
11+
options:
12+
- patch x.x.1
13+
- minor x.1.0
14+
- major 1.0.0
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Install Dependencies
23+
run: | # vsce etc
24+
npm i
25+
26+
- name: Setup Github Actions
27+
run: | # allow use of `git push`
28+
git config --global user.name "RedCMD"
29+
git config --global user.email "theredcmd@gmail.com"
30+
git add .
31+
git diff-index --quiet HEAD || git commit -m "Sync Github Actions"
32+
33+
- name: Package Extension
34+
run: | # `.vsix` file
35+
npx vsce package ${{ github.event.inputs.version }}
36+
git push --tags
37+
echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_ENV"
38+
39+
- name: Generate Release
40+
run: | # create release page on github with `.vsix` file
41+
gh release create v$VERSION --generate-notes json-embedded-languages-$VERSION.vsix
42+
env:
43+
GH_TOKEN: ${{ github.token }}
44+
45+
- name: Publish Release
46+
run: | # upload to Extension Marketplace
47+
npx vsce publish -p ${{ secrets.VSCE_PAT }} --packagePath json-embedded-languages-$VERSION.vsix
48+
git push

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
*.vsix
2+
*.vsix
3+
_test_files

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"version": "0.2.0",
77
"configurations": [
88
{
9-
"name": "Extension",
9+
"name": "package.json Extension",
1010
"type": "extensionHost",
1111
"request": "launch",
1212
"args": [

.vscodeignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
.vscode/**
22
.vscode-test/**
3+
_test_files/**
4+
.github/**
5+
36
.gitignore
47
vsc-extension-quickstart.md
8+
9+
**/*.svg

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Change Log
22

3-
All notable changes to the "json-embedded-languages" extension will be documented in this file.
3+
## 0.0.2
44

5-
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
5+
- Initial release
66

7-
## [Unreleased]
87

9-
- Initial release
8+
## 0.0.1
9+
10+
- Initial commit

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright 2024 RedCMD
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 8 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,22 @@
1-
# json-embedded-languages README
2-
3-
This is the README for your extension "json-embedded-languages". After writing up a brief description, we recommend including the following sections.
1+
# JSON Embedded Languages
42

53
## Features
64

7-
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
8-
9-
For example if there is an image subfolder under your extension project workspace:
10-
11-
\!\[feature X\]\(images/feature-x.png\)
12-
13-
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
14-
15-
## Requirements
16-
17-
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
18-
19-
## Extension Settings
20-
21-
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22-
23-
For example:
24-
25-
This extension contributes the following settings:
5+
Syntax Highlighting for ShellScript language within `package.json` `"scripts"`
6+
![Example `package.json` code](images/Example.png)
267

27-
* `myExtension.enable`: Enable/disable this extension.
28-
* `myExtension.thing`: Set to `blah` to do something.
298

309
## Known Issues
3110

32-
Calling out known issues can help limit users opening duplicate issues against your extension.
11+
ShellScript doesn't highlight code after `"`.
12+
Workaround is to place a `;` at the start of each string.
3313

34-
## Release Notes
14+
This extension targets every JSON file, not just `package.json`.
15+
However only a root level `"scripts"` object is affected.
3516

36-
Users appreciate release notes as you update your extension.
37-
38-
### 1.0.0
39-
40-
Initial release of ...
41-
42-
### 1.0.1
43-
44-
Fixed issue #.
45-
46-
### 1.1.0
47-
48-
Added features X, Y, and Z.
4917

5018
---
5119

52-
## Working with Markdown
53-
54-
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55-
56-
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
57-
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
58-
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
59-
6020
## For more information
6121

62-
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63-
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
64-
65-
**Enjoy!**
22+
* The GitHub [Issue](https://github.com/microsoft/vscode/issues/224581) that spawned the idea

images/Example.png

37.4 KB
Loading

images/json.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)