Skip to content

Latest commit

 

History

History
118 lines (80 loc) · 4.54 KB

File metadata and controls

118 lines (80 loc) · 4.54 KB

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. I try to react timely, but don't count on it.
  • Start a discussion 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 and keep me motivated ;)
  • Let me buy a beer by sponsoring 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 for further questions.
  • Create a fork, do your thing, and create a pull request. Please write tests if possible.

Prerequisites

Building the Extension

  1. Clone the repository and install dependencies:

    git clone https://github.com/pajoma/vscode-journal.git
    cd vscode-journal
    npm install
  2. Compile the extension (bundles src/extension.tsdist/extension.js via esbuild):

    npm run compile
  3. Watch mode — recompiles automatically on file changes:

    npm run watch
  4. Production build (minified, no source maps):

    npm run package
  5. Lint the source code:

    npm run lint

Running the Extension in VS Code

Open the project folder in VS Code. The recommended workflow:

  1. Press F5 (or select Run → Start Debugging).
    This launches the "Run Extension" configuration, which:

    • Runs npm run watch as a pre-launch task (auto-rebuilds on changes)
    • Opens a new VS Code window (Extension Development Host) with the extension loaded
    • Uses test/ws_manual/ as the workspace folder
  2. To run without a workspace, select the "Run Extension without Workspace" launch configuration from the debug dropdown.

  3. Make changes to the source code — esbuild will rebuild automatically. Reload the Extension Development Host window (Ctrl+R / Cmd+R) to pick up changes.

Running Tests

Tests are executed inside a VS Code Extension Host using @vscode/test-cli.

  • From the terminal (runs the full pretest + test pipeline):

    npm test

    This will compile tests (tscout/), compile the extension (esbuilddist/), lint, and then run the test suite.

  • From VS Code: select the "Extension Tests" launch configuration and press F5. This compiles both the extension and tests in watch mode, then runs the tests in the Extension Development Host.

  • Compile tests only (without running them):

    npm run compile-tests

Project Structure

src/
├── extension.ts        # Extension entry point (activate/deactivate)
├── ext/                # VS Code integration (config, startup, dialogues)
├── actions/            # Business logic (reader, writer, inject, parser)
├── model/              # Data types and interfaces
├── provider/           # Commands, code actions, features
├── util/               # Utilities (controller, logger, dates, paths, strings)
└── test/               # Test suites

Key build files:

  • esbuild.mjs — Build script (replaces webpack)
  • eslint.config.mjs — ESLint flat config
  • .vscode-test.mjs — Test runner configuration
  • tsconfig.json — TypeScript compiler options

Code of conduct

Just be decent.