Skip to content

Commit

Permalink
Merge branch 'wip/rayat/new-watcher-tasks-scripts' of https://github.…
Browse files Browse the repository at this point in the history
…com/rayat-amperity/calva into rayat-amperity-wip/rayat/new-watcher-tasks-scripts
  • Loading branch information
PEZ committed Apr 2, 2022
2 parents bdffa90 + 9eab1b2 commit e779363
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"arglists",
"autoindent",
"Batsov",
"behaviour",
"bencode",
"betterthantomorrow",
"bhauman",
Expand All @@ -33,6 +34,7 @@
"cljify",
"cljslib",
"CLJSREPL",
"Clojuredocs",
"clojurians",
"Clojurists",
"cmdline",
Expand All @@ -58,6 +60,7 @@
"docmirror",
"Docstring",
"Dorg",
"doseq",
"dotimes",
"Dvlaaad",
"eckstein",
Expand Down Expand Up @@ -103,6 +106,7 @@
"jszip",
"junit",
"keywordize",
"keywordized",
"klepsch",
"kondo",
"lein",
Expand Down Expand Up @@ -201,5 +205,17 @@
"languageId": ["clojure", "json", "typescript"],
"allowCompoundWords": false
}
]
],
"githubIssues.issueBranchTitle": "wip/${user}/issue-#${issueNumber}/${sanitizedIssueTitle}",
"typescript.tsdk": "node_modules/typescript/lib",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"peacock.color": "#e48141"
}
135 changes: 134 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,140 @@
"kind": "build",
"isDefault": true
},
"problemMatcher": "$tsc-watch"
"problemMatcher": "$tsc-watch",
"presentation": {
"panel": "dedicated",
"group": "defaultCalva"
}
},
{
"label": "Calva Test Watch",
"type": "npm",
"script": "unit-test-watch",
"isBackground": true,
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": {
// "owner": "mocha",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": [
{
"regexp": "^not\\sok\\s\\d+\\s(.*)$"
},
{
"regexp": "\\s+(.*)$",
"message": 1
},
{
"regexp": "\\s+at\\s(.*)\\s\\((.*):(\\d+):(\\d+)\\)",
"file": 2,
"line": 3,
"column": 4
}
]
},
"presentation": {
"panel": "dedicated",
"group": "defaultCalva"
}
},
{
"label": "Calva Lint Watch",
"type": "npm",
"script": "eslint-watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": "$eslint-compact",
"presentation": {
"panel": "dedicated",
"group": "defaultCalva"
}
},
{
"label": "Calva Prettier Check Watch",
"type": "npm",
"script": "prettier-check-watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": [
{
"owner": "prettier",
"source": "prettier",
"fileLocation": ["relative", "${workspaceRoot}"],
"severity": "warning",
"pattern": {
"regexp": "\\[warn\\] (.+)",
"kind": "file",
"file": 1,
"message": 1
},
"background": {
"activeOnStart": true,
"beginsPattern": "Checking formatting",
"endsPattern": "(\\[warn\\] Code style issues found in the above file\\(s\\))|(All matched files use Prettier code style!)"
}
},
{
"owner": "prettier",
"source": "prettier",
"fileLocation": ["relative", "${workspaceRoot}"],
"severity": "error",
"pattern": {
"regexp": "\\[(error)\\] (.+?): (.+) \\((\\d+?):(\\d+?)\\)",
"kind": "location",
"severity": 1,
"file": 2,
"message": 3,
"line": 4,
"column": 5
},
"background": {
"activeOnStart": true,
"beginsPattern": "Checking formatting",
"endsPattern": "(\\[warn\\] Code style issues found in the above file\\(s\\))|(All matched files use Prettier code style!)"
}
}
],
"presentation": {
"panel": "dedicated",
"group": "defaultCalva"
}
},
{
"label": "Calva Prettier Format Watch",
"type": "npm",
"script": "prettier-format-watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": false
},

"presentation": {
"panel": "dedicated",
"group": "defaultCalva"
}
},
{
"label": "Calva Dev",
"group": {
"kind": "build",
"isDefault": false
},
"dependsOn": [
"Calva Watch",
"Calva Test Watch",
"Calva Lint Watch",
"Calva Prettier Format Watch"
]
}
]
}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Changes to Calva.
- Maintenance: [Cleanup/removal of EditableDocument.selectionLeft/Right APIs](https://github.com/BetterThanTomorrow/calva/issues/1607)]
- Update node version to v14, which is maintenance LTS until 2023-04-30

- Maintenance: Create npm scripts for prettier format+check watching, and expose vsc tasks for watching unit tests, prettier format, eslint and a compound task to run them all in one go.

## [2.0.261] - 2022-04-01
- Fix: [Results doc gets in a bad state and does not update](https://github.com/BetterThanTomorrow/calva/issues/1509)
- Fix: [Indenting not working correctly in vectors starting with fn-like symbols](https://github.com/BetterThanTomorrow/calva/issues/1622)
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2695,10 +2695,12 @@
"calva-lib-test": "node ./out/cljs-lib/test/cljs-lib-tests.js",
"integration-test": "node ./out/extension-test/integration/runTests.js",
"unit-test": "npx mocha --require ts-node/register 'src/extension-test/unit/**/*-test.ts'",
"unit-test-watch": "npm run unit-test -- --watch",
"unit-test-watch": "npx mocha --watch --require ts-node/register 'src/extension-test/unit/**/*-test.ts'",
"publish": "bb publish.clj",
"prettier-format": "npx prettier --write './**/*.{ts,js,json}'",
"prettier-check": "npx prettier --check './**/*.{ts,js,json}'",
"prettier-check-watch": "npx onchange './**/*.{ts,js,json}' -- prettier --check {{changed}}",
"prettier-format-watch": "npx onchange './**/*.{ts,js,json}' -- prettier --write {{changed}}",
"eslint": "npx eslint . --ext .js,.jsx,.ts,.tsx",
"eslint-watch": "npx esw . --ext .js,.jsx,.ts,.tsx --watch"
},
Expand Down

0 comments on commit e779363

Please sign in to comment.