Skip to content

Commit

Permalink
Merge pull request #123 from pajoma/develop
Browse files Browse the repository at this point in the history
Merging released code to main
  • Loading branch information
pajoma authored Apr 13, 2022
2 parents eecbe33 + 8dff994 commit 28270e6
Show file tree
Hide file tree
Showing 124 changed files with 7,883 additions and 5,121 deletions.
25 changes: 8 additions & 17 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"tslint:recommended"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"@typescript-eslint/tslint"
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off",
"no-use-before-declare": false,
"no-unused-expression": true,
"no-duplicate-variable": true,
"class-name": true,
"await-promise": [
true,
"Promise",
"PromiseLike",
"Thenable"
]
}
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: pajoma
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dist
node_modules
*.vsix
npm-debug*
*.js
src/*.js
*.js.map

*.log
*.old
*.old
test/workspace
67 changes: 20 additions & 47 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,37 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// 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": [
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
,"--enable-source-maps"
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/test/ws_manual/"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Run Extension with Test Journal",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"
,"--list-extensions"
,"--enable-source-maps"
//,"--extensions-data-dir", "${workspaceFolder}/../tests/extensions-data"
//,"--extensions-dir", "${workspaceFolder}/../tests/extensions"
//,"--install-extension", "Gruntfuggly.vscode-journal-view"
,"${workspaceFolder}/test/workspace/"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension with Default Journal",
"type": "extensionHost",
"request": "launch",
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
,"${workspaceFolder}/test/empty-workspace/"
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index",
"${workspaceFolder}/test/ws_unittests/"
],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
"preLaunchTask": "npm: watch"
}
]
"preLaunchTask": "tasks: watch-tests"
}
]
}
34 changes: 15 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false,
"dist": false
},
"licenser.author": "Patrick Maué",
"licenser.license": "GPLv3",
"licenser.projectName": "vscode-journal",
"search.exclude": {
"out": true,
"dist": true
},
"typescript.tsc.autoDetect": "off",
"typescript.format.semicolons": "insert",
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
"editor.codeActionsOnSave": {

},
"typescript.tsdk": "node_modules/typescript/lib",
}
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"dist": false, // set this to true to hide the "dist" folder with the compiled JS files
"src/**/*.js": false,
"**/*.d.ts": true,
"**/*.js.map": true
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
86 changes: 50 additions & 36 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,51 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "bundle",
"problemMatcher": [],
"label": "npm: bundle",
"detail": "esbuild src/extension.ts --bundle --outdir=dist --external:vscode --platform=node --target=node12.18 --minify --sourcemap"
},
{
"type": "npm",
"script": "esbuild-watch",
"problemMatcher": [
"$eslint-stylish"
],
"group": "build",
"label": "npm: esbuild-watch",
"detail": "npm run -S esbuild-base -- --sourcemap --watch"
},
{
"type": "npm",
"script": "esbuild",
"problemMatcher": [
"$eslint-stylish"
],
"group": {
"kind": "build",
"isDefault": true
},
"label": "npm: esbuild",
"detail": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node"
}
]
}
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": [
"$ts-webpack-watch",
"$tslint-webpack-watch"
],
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": [
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
},
{
"type": "npm",
"script": "compile-tests",
"group": "build",
"problemMatcher": [],
"label": "npm: compile-tests",
"detail": "tsc -p . --outDir out"
}
]
}
18 changes: 10 additions & 8 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
.vscode/**
.vscode-test/**
node_modules
out/
test/
src/
docs/**
**/*.map
out/**
node_modules/**
src/**
.gitignore
tsconfig.json
.yarnrc
webpack.config.js
vsc-extension-quickstart.md
ebpack.config.json
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
test/**
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
## On Hold
* Interact with markdown file (ctrl+click) mark checkboxes, etc. (requires a language server)


## 1.0
### Planned
* Interact with markdown file (ctrl+click) mark checkboxes, etc. (required a language server)
* [Issue #19](https://github.com/pajoma/vscode-journal/issues/20) - Support for scopes

* Use snippets for inline templates
* Connection to Office 365 to sync tasks
* Rework the whole syntax highlighting (it's a mess)
* More code actions and code lenses (e.g. to pull all open tasks to the current journal entry)

## 1.0.0

* Switching to version 1.0, since it I am using it daily for 5 years now and it seems production ready.
* Support for scopes has been tested over the last year and is working as intended. See [this explanation](./docs/scopes.md) for details.
* Added code actions to work with the tasks. You can now complete tasks or copy (shift) them other journal entries.
* [Issue #103](https://github.com/pajoma/vscode-journal/issues/103) Added support for weekly entries
* [Issue #104](https://github.com/pajoma/vscode-journal/issues/104) Added guidelines to contribute
* [Issue #102](https://github.com/pajoma/vscode-journal/issues/102), [Issue #101](https://github.com/pajoma/vscode-journal/issues/101) Removed markdown extension for formatting tables
* [Issue #100](https://github.com/pajoma/vscode-journal/issues/100), [Issue #97](https://github.com/pajoma/vscode-journal/issues/97) fixed various issues while syncing notes
* [Issue #91](https://github.com/pajoma/vscode-journal/issues/91) Support for multilines in the settings
* [Issue #77](https://github.com/pajoma/vscode-journal/issues/77) Injecting tasks and memos refactored

## 0.11.2
* [Issue #67](https://github.com/pajoma/vscode-journal/issues/67) Quickfix for typo, which caused configurations to be ignored
Expand Down
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to VSCode-Journal
Thank you so much for your interest in contributing! All types of contributions are encouraged and valued.

## About the Project
I have been writing notes every day for over 10 years and still use this extension all the time. In the beginning only with Notepad and other text editors. When the first version of Visual Studio Code came out, I saw an opportunity to get to know Typescript better and started developing this extension. That's why I mainly focus on ideas and extensions that help me in my daily work.

The source code reflects this journey. A bit bumpy at the beginning (and still today for sure, all this javascript stuff makes me doubt myself often enough), but it got a bit better with the years.

## How to contribute

There are several ways to contribute.

* If you find any issues, weird behaviour or plain error, don't hesitate to [open an issue](https://github.com/pajoma/vscode-journal/issues/new). I try to react timely, but don't count on it.
* [Start a discussion](https://github.com/pajoma/vscode-journal/discussions/new) if you have question or feature requests. Or see if there are any other unanswered questions you might be able to answer.
* Leave a review on the [marketplace](https://marketplace.visualstudio.com/items?itemName=pajoma.vscode-journal&ssr=false#review-details) and keep me motivated ;)
* Let me buy a beer by [sponsoring](https://github.com/sponsors/pajoma) my work here

If you plan to contribute with updates to the source, follow these steps

* Outline your idea in the discussions.
* Talk to me on [Gitter](https://gitter.im/dictyo) for further questions.
* Create a fork, do your thing, and create a pull request. Please write tests if possible.

## Code of conduct

Just be decent.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ This extension is useful for people like me, who use simple text files for notes
* Manage your tasks ([details and videos](./docs/tasks.md))
* Print commands and snippets to support various tasks ([details and videos](./docs/print.md))
* Configure scopes to manage notes of different projects ([details](./docs/scopes.md))
* Use code actions to work on your task lists ([details](./docs/codeactions.md))

## Features
Press `Ctrl+Shift+J` to open the journal's smart input and start typing right away. Press `F1` or `Ctrl+Shift+P` to access one of the commands. All supported commands are described [here](./docs/commands.md).

The notes are stored in a folder on your desktop using the following structure (taking ZIM Desktop wiki as inspiration: `year/month/day.md`, the notes files for October 22th would be `../2016/10/22.md`. Detailed notes (e.g. meeting notes) are placed in the subfolder `../2016/10/22/some-meeting-notes.md`.

## Contributing
I am always looking for feedback, new ideas and your help. Check the [contribution guidelines](./CONTRIBUTING.md)

## Suggested extensions
vscode-journal is mainly responsible for organizing your notes and journal entries, it does not come with any user interface (besides the smart input). If you prefer tree like views for your notes and tasks, have a look at the following extensions by Gruntfuggly and Kortina

Expand All @@ -56,6 +60,4 @@ Syntax highlighting is configured in your workspace settings. The options are st

## Demo

![Screen Capture](./docs/intro.gif)

The demo shows also the use of the [vscode-journal-view](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.vscode-journal-view) extension for browsing for vscode-journal by [Gruntfuggly](https://github.com/Gruntfuggly/vscode-journal-view)
![Screen Capture](./docs/complete.gif)
Binary file added docs/codeactions.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/codeactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Code Actions

Code actions are a Visual Studio Code feature (and basically every serious other IDE) to quickly run a commands from within the text. For now, the journal extension has code extension active for tasks. When you place your mouse cursor on a line with a task (any line starting with `- []` or `-[x]`), a yellow balloon will appear. You can trigger the selection of code actions by selecting the balloon or using the shortcut `CTRL+.`

The following actions are supported for now
* Complete a task (marks the task and adds the completion time)
* Reopen a task
* Migrate a task to today (when current entry is from another day). It will modify the task to `[>]` (inspired by bullet journaling) and append the new date
* Migrate a task to tomorrow
* Migrate a task to the next working day (if tomorrow is in the weekend)


![Screen Capture](./codeactions.gif)
Loading

0 comments on commit 28270e6

Please sign in to comment.