DEV Community

Cover image for Hacktoberfest: Let's build a VS Code Extension
Juan Alejandro Morais
Juan Alejandro Morais

Posted on • Updated on

Hacktoberfest: Let's build a VS Code Extension

Hi everyone! πŸ‘‹

A few weeks ago, I started building a VS Code extension called LightSwitch. It allows you to set-up two themes that swap around day & night. All you have to do is choose your themes and set your preferred times to switch them.

GitHub logo timrodz / vscode-light-switch

πŸ’‘ Light Switch allows you to set-up two themes that swap around day & night. All you have to do is pick your themes and set your preferred times.

Update: thanks for all the support! I appreciate you all. ❀️

Any stars are more than welcome ⭐

Since we're in Hacktoberfest, building a tool together would be a great way to celebrate it (along with open source software)!

Why? πŸ€”

Not so long ago, I started wearing prescription glasses, and thus I have been swapping between light/dark themes according to where/when I'm working.

"Why not make a tool to automate this?!"

This was the perfect reason to work on a small project that would teach me the API, workflows of VS Code, along with Typescript.

I must admit, creating an MVP was incredibly easy, and I encourage all fellow devs to tinker with their own extensions β€”Β It's also a great way to get started with Typescript!

The extension πŸš€

A basic implementation of LightSwitch is working, with the following features:

  • Set themes to night and day
  • Switch between night/day themes
  • Switch themes according to a specific time

By collaborating in this project you will:

  • Use Typescript to implement features, tests and fix bugs. Don't know the language? No worries! You can learn Typescript in 5 minutes.
  • Be exposed to API methods that will help you understand how extensions work. Discover the VS Code API.
  • Achieve your Hacktoberfest PRs (In case you need them).
  • Work on a small Open Source project!

I' open to discussions of any kind. Any contribution is more than valid ❀

I'm in! Show me the issues πŸ› 

Woop Woop! The complete list of issues can be found here.

Discussion: Features & Enhancements #12

Hi team!

If you have any features/enhancements you'd like to propose, this is the place to share them.


Add better screenshots / GIFs #4

As of now, it can be a bit difficult to understand what this tool does. A set of new, clear screenshots and (better) GIFs would be great.


Add more tests #5

Currently, the suite of tests is very basic. Ideally, we should be testing the following areas:

  • Utilities i.e. workskpace
  • Commands i.e. setTheme, switchThemes
  • Command binder - What could possibly go wrong?
  • String verification through extension settings and date

If you have ideas for any other tests, let me know.


Audit and improve util/workspace #6

Currently, workspace runs methods with little to no checks. We should cover potential breaking cases such as:

  • User having multi-root workspaces
  • Themes that don't exist (or have been deleted)

Photo by Hans-Peter Gauster on Unsplash.

Top comments (5)

Collapse
 
moinuddin14 profile image
Khaja Moinuddin Mohammed

Juan am new to open source and most importantly coming from an automation testing background. But am pretty passionate about development and especially open source. I was looking to start my dev journey in open source world with an exciting project and this sounds pretty good. I will look into the project, do you happen to have a slack or discord channel for contributors to connect with?

Collapse
 
timrodz profile image
Juan Alejandro Morais

Hi Khaja, good to have you here! While I don’t have any discussion channels open, you’re more than welcome to jump on Github and work on any issues you might find interesting, OR post your ideas on the discussion thread :)

Collapse
 
moinuddin14 profile image
Khaja Moinuddin Mohammed

Thank you Juan, surely will do

Collapse
 
curtisbowden profile image
Curtis Bowden

Great idea Juan, I have a couple random feature thoughts I'll throw into the discussion and hopefully make a contribution!

Collapse
 
timrodz profile image
Juan Alejandro Morais

Hi Curtis, thank you for participating! πŸ˜„