This project is a sample project for creating a VS Code plugin with a hexagonal software architecture.
Report Bug
·
Request Feature
This project is a sample project for creating a VS Code plugin with a hexagonal software architecture.
- Clone the repository
https://github.com/peterhnm/vscode-hexagonal-example.git
- Install dependencies
yarn install
- Build the project
yarn build
- Run the project in VS Code
Press
code .
F5
to run the project in debug mode. Within the Extension Host open the example folder.
The application's rough software architecture
I am using the Hexagonal Architecture as described by Tom Hombergs in his book
Get Your Hands Dirty on Clean Architecture.
The plugin is an example of a CustomTextEditor
which reacts on .hexagon
files.
As you can see in the diagram above, the application is divided into:
- Input-Adapters "drive" our application. In the case of a VS Code plugin, these are mainly user inputs.
- Services contain the business logic of our application. They are the core of our application.
- Output-Adapters are "driven" by our application to communicate with the outside world. In the case of a VS Code plugin, this is the VS Code API itself.
The application core, which contains the ports and services, has no dependencies on the VS Code API.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please open an issue with the tag "enhancement", fork the repo and
create a pull request. You can also simply open an issue with the tag "enhancement".
Please use semantic commit messages as described
in here.
Don't forget to give the project a star! Thanks again!
- Open an issue with the tag "enhancement"
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under this license.