How I created my first Open Source project
Tags: javascript, opensource, showdev, codenewbie
Published: 2022-03-30 04:40:22

🧑‍💻 After using Linux for more than 2 years, I had to go back to using Windows as my only operating system, leaving behind the good times I had in Linux.

One of the things I haven't been able to overcome, and it's not my ex, has been the use of the terminal, as I could do anything quickly and easily.

Here's where I found a problem, specifically with the `New-Item` command, which only allows me to create one file per command. For example:
```powershell
> New-Item src\index.js
```

You might ask me, "What's the problem?" Well, in `Linux` we have a command called `touch` which allows us to generate as many files as we want using only one command. For example:
```bash
> touch src/index.js src/components/Component.jsx src/utils/util.js
```

So I decided to create a CLI program called `touch-win`, which is written entirely in JavaScript. Someone might comment, "There are already programs that are an alternative to the `touch` command in windows," and that's really true. There are many programs, and they're not hard to find. You can look for them on `npm`, `scoop`, or any other package manager.

At this point, I present to you **[Touch-Win](https://github.com/zitrocode/touch-win)**, my improved version of the `touch` command for all operating systems.

If I enjoy working in the terminal, one of the tasks I find most repetitive is creating folders and generating three or more files inside them. For example:
```bash
# Create folders
> mkdir -p ./src/components/Search

# Create files
> touch ./src/components/Search/index.js ./src/components/Search/Search.test.js ./src/components/Search/Search.css
```

I realized that this was a waste of time and energy, so I looked for a more effective solution.
This is where [Touch-Win](https://github.com/zitrocode/touch-win) comes into play, as it perfectly solved the aforementioned tasks:
```bash
> touch-win ./src/components/Search/index.js ./src/components/Search.css ./src/components/Search.test.js
```

What's the difference? Well, **Touch-Win** has the ability to generate the missing folders, so you no longer need to use `mkdir`!

Another repetitive task is the file paths that need to be generated, in this case, `.src/components/Search`.

With the `--base` or `-b` option followed by the path, you no longer need to write the path again for each file, *Touch-Win* takes care of it for you. For example:
```bash
> touch-win -b ./src/components/Search index.js Search.test Search.css
```

Before publishing this blog, Touch-Win already has more than 500 downloads. Will you be the next to use it?
👉 [Download Here](https://www.npmjs.com/package/touch-win)

🧑‍💻 For a couple of months, I wanted to create something for the community after 2 years of dedicating myself professionally to software development. Today, **with Touch-Win**, I write my first `Hello Open Source!`.

_Made with love by **[Oscar Ortiz](https://www.linkedin.com/in/zitrocode/)**, a technology enthusiast and passionate about open source code. This project is a personal effort to share knowledge and skills with the community. I hope it's useful for other developers and technology enthusiasts. Feel free to contribute or use this project in any way you want. **Thank you for your interest and support!**._