Skip to content

Commit

Permalink
feat(config-editor): plugin for config files (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhnm authored Nov 8, 2023
1 parent 8225a43 commit e74e688
Show file tree
Hide file tree
Showing 128 changed files with 3,243 additions and 150 deletions.
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

0 comments on commit e74e688

Please sign in to comment.