Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
feat: vscode extension (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slowlife01 authored Feb 25, 2023
1 parent 76f9cb9 commit 69d6c42
Show file tree
Hide file tree
Showing 78 changed files with 2,579 additions and 865 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.vsix

# Logs
logs
*.log
Expand Down
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/apps/extension"],
"outFiles": ["${workspaceFolder}/apps/extension/dist/**/*.js"],
"preLaunchTask": "npm: extension:debug"
}
]
}
43 changes: 43 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "extension:debug",
"problemMatcher": {
"owner": "tsup",
"source": "tsup",
"severity": "error",
"pattern": [
{
"regexp": "^✘\\s+\\[ERROR\\]\\s+(.+)$",
"message": 1
},
{
"regexp": "^\\s*$"
},
{
"regexp": "^\\s+(.+):(\\d+):(\\d+):$",
"file": 1,
"line": 2,
"column": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "^CJS Build start$",
"endsPattern": "^CJS .* Build success|^CJS Build failed"
}
},
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

10 changes: 10 additions & 0 deletions apps/extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode/
src/
types/

*.ts

dist/*.ts
dist/*.js.map

tsconfig.json
1 change: 1 addition & 0 deletions apps/extension/LICENSE
14 changes: 14 additions & 0 deletions apps/extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## About
Tool for creating and modifying Presences.

## Using the commands
To use the commands, open up the Command Palette using `Ctrl+Shift+P`

![image](https://user-images.githubusercontent.com/54318514/196675302-e172d4b9-6f04-4551-8288-8de9293c2188.png)

## Debugging the Extension

- Run `pnpm install` to install dependencies
- Press `F5`, this will:
- Start a task `npm: debug:extension` to compile the code
- Run the extension in a new VS Code window
Binary file added apps/extension/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "premid-pmd",
"displayName": "pmd",
"description": "Tool for creating and modifying Presences.",
"version": "1.0.0",
"publisher": "PreMiD",
"private": true,
"license": "MPL-2.0",
"icon": "assets/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/PreMiD/pmd"
},
"bugs": {
"url": "https://github.com/PreMiD/pmd/issues"
},
"homepage": "https://github.com/PreMiD/pmd/tree/main/apps/extension#readme",
"engines": {
"vscode": "^1.63.0"
},
"categories": [
"Other"
],
"main": "./dist/extension.js",
"activationEvents": [],
"contributes": {
"commands": [
{
"command": "pmd.createPresence",
"title": "Create a Presence",
"category": "PMD"
},
{
"command": "pmd.modifyPresence",
"title": "Modify a Presence",
"category": "PMD"
}
]
},
"scripts": {
"vscode:prepublish": "pnpm run compile",
"compile": "tsup",
"debug": "tsup --watch --sourcemap"
},
"devDependencies": {
"@pmd/cli": "workspace:*",
"@types/discord-rpc": "^4.0.3",
"@types/node": "^18.11.2",
"@types/vscode": "^1.32.0",
"axios": "^1.1.2",
"chalk": "4.0.0",
"chokidar": "^3.5.3",
"copy-webpack-plugin": "^11.0.0",
"discord-rpc": "^4.0.1",
"jsonschema": "^1.4.1",
"ts-loader": "^9.4.1",
"tsup": "^6.2.3",
"typescript": "^4.8.4",
"webpack": "^5.74.0"
}
}
Loading

0 comments on commit 69d6c42

Please sign in to comment.