Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

config: improve integration with vscode

Abdullah Atta1fb7541d1417
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 000000000..a4104a90d
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,11 @@
+{
+ // See https://go.microsoft.com/fwlink/?LinkId=827846
+ // for the documentation about the extensions.json format
+ "recommendations": [
+ "dbaeumer.vscode-eslint",
+ "esbenp.prettier-vscode",
+ "ms-playwright.playwright",
+ "firefox-devtools.vscode-firefox-debug",
+ "msjsdiag.vscode-react-native"
+ ]
+}
diff --git a/.vscode/notesnook.code-workspace b/.vscode/notesnook.code-workspace
new file mode 100644
index 000000000..317849947
--- /dev/null
+++ b/.vscode/notesnook.code-workspace
@@ -0,0 +1,72 @@
+{
+ "folders": [
+ {
+ "name": "✨ notesnook",
+ "path": ".."
+ },
+ {
+ "name": "πŸš€ @notesnook/mobile",
+ "path": "../apps/mobile"
+ },
+ {
+ "name": "πŸš€ @notesnook/web",
+ "path": "../apps/web"
+ },
+ {
+ "name": "πŸš€ @notesnook/desktop",
+ "path": "../apps/web/desktop"
+ },
+ {
+ "name": "πŸš€ @notesnook/web-clipper",
+ "path": "../extensions/web-clipper"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/clipper",
+ "path": "../packages/clipper"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/core",
+ "path": "../packages/core"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/crypto",
+ "path": "../packages/crypto"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/crypto-worker",
+ "path": "../packages/crypto-worker"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/editor",
+ "path": "../packages/editor"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/editor-mobile",
+ "path": "../packages/editor-mobile"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/logger",
+ "path": "../packages/logger"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/streamable-fs",
+ "path": "../packages/streamable-fs"
+ },
+ {
+ "name": "πŸ“¦ @notesnook/theme",
+ "path": "../packages/theme"
+ }
+ ],
+ "settings": {
+ "typescript.tsdk": "node_modules/typescript/lib",
+ "javascript.format.enable": true,
+ "editor.formatOnSave": true,
+ "editor.formatOnSaveMode": "modificationsIfAvailable",
+ "eslint.packageManager": "npm",
+ "eslint.run": "onSave",
+ "[javascript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
+ },
+ "eslint.execArgv": ["--cache"]
+ }
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 25fa6215f..000000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "typescript.tsdk": "node_modules/typescript/lib"
-}
diff --git a/apps/mobile/.vscode/launch.json b/apps/mobile/.vscode/launch.json
index 1a48c7f0c..70e3c4d0f 100644
--- a/apps/mobile/.vscode/launch.json
+++ b/apps/mobile/.vscode/launch.json
@@ -25,4 +25,4 @@
"request": "attach"
}
]
-}
+}
\ No newline at end of file
diff --git a/apps/mobile/.vscode/settings.json b/apps/mobile/.vscode/settings.json
deleted file mode 100644
index 0967ef424..000000000
--- a/apps/mobile/.vscode/settings.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/apps/web/.vscode/launch.json b/apps/web/.vscode/launch.json
index ce988ee09..448987373 100644
--- a/apps/web/.vscode/launch.json
+++ b/apps/web/.vscode/launch.json
@@ -7,14 +7,21 @@
{
"type": "chrome",
"request": "launch",
- "preLaunchTask": "StartReactApp",
+ "preLaunchTask": "Start Notesnook (web)",
"postDebugTask": "Terminate All Tasks",
- "name": "Launch Chrome against localhost",
+ "name": "Debug Chrome",
"url": "http://localhost:3000",
- "webRoot": "${workspaceFolder}",
- "env": { "DISPLAY": ":0" },
- "runtimeExecutable": "/usr/bin/brave-browser",
- "runtimeArgs": ["--remote-debugging-port=9222"]
+ "webRoot": "${workspaceFolder}"
+ },
+ {
+ "type": "firefox",
+ "request": "launch",
+ "reAttach": true,
+ "preLaunchTask": "Start Notesnook (web)",
+ "postDebugTask": "Terminate All Tasks",
+ "name": "Debug Firefox",
+ "url": "http://localhost:3000",
+ "webRoot": "${workspaceFolder}"
}
]
}
diff --git a/apps/web/.vscode/tasks.json b/apps/web/.vscode/tasks.json
index cb9e87449..0017d0e9b 100644
--- a/apps/web/.vscode/tasks.json
+++ b/apps/web/.vscode/tasks.json
@@ -5,24 +5,26 @@
"tasks": [
{
"type": "shell",
- "command": "yarn debug",
+ "command": "npm run debug",
"group": {
- "kind": "test",
+ "kind": "build",
"isDefault": true
},
+ "dependsOn": "Terminate All Tasks",
"isBackground": true, //This prevents the launch.json to wait for the completion of the task
"problemMatcher": {
+ "fileLocation": "relative",
"owner": "custom", //This is not needed but, required by the problemMatcher Object
"pattern": {
"regexp": "^$" //This is not needed but, required by the problemMatcher Object
},
"background": {
"activeOnStart": true,
- "beginsPattern": "Compiling...", //Signals the begin of the Task
- "endsPattern": "Compiled .*" //Signals that now the initialization of the task is complete
+ "beginsPattern": "^$",
+ "endsPattern": "^You can now view (.*) in the browser.$"
}
},
- "label": "StartReactApp"
+ "label": "Start Notesnook (web)"
},
{
"label": "Terminate All Tasks",