mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Add vscode configs (#2347)
This only effects contributor experience. - Run Docker dependencies and Webpack when opening project. - Run/debug configs for Fleet server and UI. - Basic settings.
This commit is contained in:
parent
b21a7dbcf2
commit
005525c88a
1
.gitignore
vendored
1
.gitignore
vendored
@ -35,7 +35,6 @@ mysqldata/
|
|||||||
helm-temp
|
helm-temp
|
||||||
|
|
||||||
#editors
|
#editors
|
||||||
.vscode
|
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
# Cypress e2e testing
|
# Cypress e2e testing
|
||||||
|
11
.vscode/extensions.json
vendored
Normal file
11
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"stkb.rewrap",
|
||||||
|
"github.vscode-pull-request-github",
|
||||||
|
"golang.go",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"redhat.vscode-yaml",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"firefox-devtools.vscode-firefox-debug"
|
||||||
|
]
|
||||||
|
}
|
79
.vscode/launch.json
vendored
Normal file
79
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Test package",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "test",
|
||||||
|
"cwd": "${fileDirname}",
|
||||||
|
"env": {
|
||||||
|
"MYSQL_TEST": 1,
|
||||||
|
"REDIS_TEST": 1
|
||||||
|
},
|
||||||
|
"buildFlags": "--tags='full,fts5'",
|
||||||
|
"program": "${fileDirname}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Test file",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "test",
|
||||||
|
"cwd": "${fileDirname}",
|
||||||
|
"env": {
|
||||||
|
"MYSQL_TEST": 1,
|
||||||
|
"REDIS_TEST": 1
|
||||||
|
},
|
||||||
|
"buildFlags": "--tags='full,fts5'",
|
||||||
|
"program": "${file}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Fleet serve",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "auto",
|
||||||
|
"buildFlags": "--tags='full,fts5'",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"program": "${workspaceFolder}/cmd/fleet",
|
||||||
|
"args": [
|
||||||
|
"serve",
|
||||||
|
"--dev"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Fleet serve (licensed)",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "auto",
|
||||||
|
"buildFlags": "--tags='full,fts5'",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"program": "${workspaceFolder}/cmd/fleet",
|
||||||
|
"args": [
|
||||||
|
"serve",
|
||||||
|
"--dev",
|
||||||
|
"--dev_license"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "pwa-chrome",
|
||||||
|
"name": "Fleet UI (Chrome)",
|
||||||
|
"request": "launch",
|
||||||
|
"url": "https://localhost:8080"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "firefox",
|
||||||
|
"name": "Fleet UI (Firefox)",
|
||||||
|
"request": "launch",
|
||||||
|
"url": "https://localhost:8080",
|
||||||
|
"pathMappings": [
|
||||||
|
{
|
||||||
|
"url": "webpack:///frontend",
|
||||||
|
"path": "${workspaceFolder}/frontend"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
31
.vscode/settings.json
vendored
Normal file
31
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"makefile.extensionOutputFolder": "./.vscode",
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnType": true,
|
||||||
|
"diffEditor.codeLens": true,
|
||||||
|
"rewrap.autoWrap.enabled": true,
|
||||||
|
"rewrap.wrappingColumn": 100,
|
||||||
|
"go.formatTool": "gofumports",
|
||||||
|
"go.lintTool": "golangci-lint",
|
||||||
|
"go.useLanguageServer": true,
|
||||||
|
"gopls": {
|
||||||
|
"gofumpt": true,
|
||||||
|
},
|
||||||
|
"go.autocompleteUnimportedPackages": true,
|
||||||
|
"go.buildTags": "full,fts5",
|
||||||
|
"go.delveConfig": {
|
||||||
|
"dlvLoadConfig": {
|
||||||
|
"followPointers": true,
|
||||||
|
"maxVariableRecurse": 1,
|
||||||
|
"maxStringLen": 256,
|
||||||
|
"maxArrayValues": 64,
|
||||||
|
"maxStructFields": -1
|
||||||
|
},
|
||||||
|
"apiVersion": 2,
|
||||||
|
"showGlobalVariables": true,
|
||||||
|
"debugAdapter": "legacy",
|
||||||
|
"substitutePath": []
|
||||||
|
},
|
||||||
|
"go.testTimeout": "60s"
|
||||||
|
}
|
41
.vscode/tasks.json
vendored
Normal file
41
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "lint",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$eslint-stylish"
|
||||||
|
],
|
||||||
|
"label": "npm: lint",
|
||||||
|
"detail": "eslint frontend cypress --ext .js,.jsx,.ts,.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Docker Compose Dependencies",
|
||||||
|
"command": "docker-compose up",
|
||||||
|
"isBackground": true,
|
||||||
|
"presentation": {
|
||||||
|
"panel": "dedicated"
|
||||||
|
},
|
||||||
|
"runOptions": {
|
||||||
|
"instanceLimit": 1,
|
||||||
|
"runOn": "folderOpen"
|
||||||
|
},
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "Make generate-dev",
|
||||||
|
"command": "make generate-dev",
|
||||||
|
"isBackground": true,
|
||||||
|
"presentation": {
|
||||||
|
"panel": "dedicated"
|
||||||
|
},
|
||||||
|
"runOptions": {
|
||||||
|
"instanceLimit": 1,
|
||||||
|
"runOn": "folderOpen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user