Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 30, 2022 04:40 am GMT

How to create my first Open Source project

After using a Linux distribution (Arch Linux) for more than 2 years, I had to return to Windows as my only operating system, leaving behind the good times I had in Linux.

One of the things that I have not been able to overcome, is the use of the terminal,
because he could do anything.

This is where I run into a little problem, using the New-Item command I can only create one file per command.
For example:

New-Item index.js

Surely you will ask me, what is the problem? Well, on Linux we have a command called touch which allows us to generate whatever files we want using just one command.
For example:

touch src/components/Search.js src/components/Search.test.js src/components/Search.css

So I made the decision to make a cli program called touch-win, which is written in JavaScript.

Although there are several versions of this command in npm or to get it with scoop, you need something different.

Although I like to use the terminal in my day to day, one of the most repetitive things I went through was to generate a folder, within it generate 3 or more files.
A clearer example:

# Create folder$ mkdir src/components/Search# Create files$ touch src/components/Search/index.js src/components/Search.test.js src/components/Search.css

Now do you understand better?

Touch Win perfectly solved the above mentioned task using only one command.

touch-win src/components/Search/index.js src/components/Search.css src/components/Search.test.js

Touch Win has the ability to generate missing folders, no need to use mkdir anymore.

Another of the more repetitive tasks is the paths of the files you want to generate src/components/Search.

With the --base or -b option followed by the src/components/Search path you no longer need to type the entire file path. Touch Win will take care of that.

touch-win -b src/components/Search index.js Search.test.js Search.css

It currently has more than 300 downloads. Will you be the next to use it?
https://www.npmjs.com/package/touch-win

For a couple of months I wanted to create something for the community. For 3 years of having made my hello world!, today, with this project I write my Hello open source!.


Original Link: https://dev.to/zitrocode/how-to-create-my-first-open-source-project-42o6

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To