Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config-editor): plugin for config files #412

Merged
merged 23 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
57a8c17
docs: remove typos
peterhnm Oct 17, 2023
0c0fb0b
chore: rename miranum-modeler webviews
peterhnm Oct 17, 2023
2ac28e4
feat: add the application for the plugin and its webview
peterhnm Oct 17, 2023
2b2389a
docs: remove typo
peterhnm Oct 17, 2023
518c95b
refactor: remove unused method and add comments
peterhnm Oct 18, 2023
5a4ddc8
feat: setup webview for browser
peterhnm Oct 18, 2023
f4527b8
feat: add state management and fix styling issues
peterhnm Oct 19, 2023
fd7bec2
chore: update lib id's
peterhnm Oct 19, 2023
0b07ebf
feat: connect extension to its webview
peterhnm Oct 19, 2023
129f4a7
feat: add use cases
peterhnm Oct 24, 2023
0ed0479
docs: add component diagram
peterhnm Oct 24, 2023
a5ef00c
docs: add development.md
peterhnm Oct 24, 2023
784fbcb
chore: add missing files
peterhnm Oct 24, 2023
5943507
feat: always send the current content of the document when webview ge…
peterhnm Oct 25, 2023
06d35b7
feat: use dark or light theme according to the VS Code Theme
peterhnm Oct 25, 2023
62cd0c0
docs: update README.md and development.md
peterhnm Oct 25, 2023
d2fe881
feat: add miranum-config-editor to the Extension Pack
peterhnm Oct 25, 2023
d89e031
docs: add Quickstart Guide to the README.md
peterhnm Oct 25, 2023
678c0ce
chore(cicd): add miranum-config-editor
peterhnm Oct 25, 2023
028ea9e
docs: update CHANGELOG.md
peterhnm Oct 25, 2023
b1b8848
fix: bug when open an empty file
peterhnm Oct 26, 2023
42bd993
Merge branch 'main' into feat/plugin_for_config_files
peterhnm Nov 8, 2023
922e214
chore: merge main into feat/plugin_for_config_files
peterhnm Nov 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/dry-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
run: |
cd apps/miranum-extension-pack
vsce package --out miranum-extension-pack.vsix
- name: Build vsix miranum-config-editor
run: |
cd apps/miranum-config-editor
vsce package --no-dependencies --out miranum-config-editor.vsix
- name: Build vsix miranum-console
run: |
cd apps/miranum-console
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ on:
type: boolean
required: true
default: true
miranum-config-editor:
description: 'Release miranum-config-editor app?'
type: boolean
required: true
default: true
miranum-console:
description: 'Release miranum-console app?'
type: boolean
Expand Down Expand Up @@ -96,6 +101,11 @@ jobs:
with:
name: miranum-extension-pack
path: dist/apps/miranum-extension-pack
# miranum-config-editor
- uses: actions/upload-artifact@v3
with:
name: miranum-config-editor
path: dist/apps/miranum-config-editor
# miranum-console
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -231,6 +241,31 @@ jobs:
env:
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }}

# miranum-config-editor
publish-miranum-config-editor:
if: github.event.inputs.miranum-config-editor == 'true'
runs-on: ubuntu-latest
needs:
- build
- create-release
steps:
- name: Setup NodeJS 16
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- uses: actions/download-artifact@v3
with:
name: miranum-config-editor
- name: Prepare
run: npm install && npm install -g @vscode/vsce@latest
- name: Build vsix
run: vsce package --out miranum-config-editor.vsix
- name: Publish extension
run: vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PUBLISH }}

# miranum-console
publish-miranum-console:
if: github.event.inputs.miranum-console == 'true'
Expand Down
146 changes: 83 additions & 63 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,85 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run miranum-console",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-console"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-console/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-console/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-console/*"
}
},
{
"name": "Run miranum-forms",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-forms"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-forms/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-forms/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-forms/*"
}
},
{
"name": "Run miranum-modeler",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-modeler"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-modeler/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-modeler/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-modeler/*"
}
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run miranum-console",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-console"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-console/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-console/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-console/*"
}
},
{
"name": "Run miranum-forms",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-forms"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-forms/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-forms/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-forms/*"
}
},
{
"name": "Run miranum-modeler",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-modeler"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-modeler/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-modeler/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-modeler/*"
}
},
{
"name": "Run miranum-config-editor",
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/dist/apps/miranum-config-editor"
],
"outFiles": [
"${workspaceFolder}/dist/apps/miranum-config-editor/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/dist/apps/miranum-config-editor/**",
"!**/node_modules/**"
],
"sourceMapPathOverrides": {
"webpack:///./~/*": "${workspaceFolder}/node_modules/*",
"webpack://?:*/*": "${workspaceFolder}/apps/miranum-config-editor/*"
}
}
]
}
5 changes: 5 additions & 0 deletions apps/miranum-config-editor-webview/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@nx/js/babel"
]
}
40 changes: 40 additions & 0 deletions apps/miranum-config-editor-webview/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"extends": [
"../../.eslintrc.json",
"plugin:vue/essential",
"prettier",
"@vue/typescript/recommended",
"@vue/eslint-config-prettier"
],
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {}
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-interface": "warn"
}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
}
]
}
14 changes: 14 additions & 0 deletions apps/miranum-config-editor-webview/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}

declare module 'vue' {
export interface GlobalComponents {
VApp: typeof import('vuetify/lib')['VApp']
VCard: typeof import('vuetify/lib')['VCard']
VContainer: typeof import('vuetify/lib')['VContainer']
}
}
18 changes: 18 additions & 0 deletions apps/miranum-config-editor-webview/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>MiranumConfigEditorWebview</title>
<base href="/" />

<meta content="width=device-width, initial-scale=1" name="viewport" />
<link href="/favicon.ico" rel="icon" type="image/x-icon" />
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="/src/styles.css" rel="stylesheet" />
</head>
<body>
<div id="app"></div>
<script src="/src/main.ts" type="module"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions apps/miranum-config-editor-webview/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
displayName: "miranum-config-editor-webview",
preset: "../../jest.preset.js",
transform: {
"^.+.vue$": "@vue/vue2-jest",
".+.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub",
"^.+.tsx?$": [
"ts-jest",
{
tsconfig: "apps/miranum-config-editor-webview/tsconfig.spec.json",
},
],
},
moduleFileExtensions: ["ts", "tsx", "vue", "js", "json"],
coverageDirectory: "../../coverage/apps/miranum-config-editor-webview",
snapshotSerializers: ["jest-serializer-vue"],
globals: {
"vue-jest": {
tsConfig: "apps/miranum-config-editor-webview/tsconfig.spec.json",
},
},
};
Loading
Loading