Socket
Socket
Sign inDemoInstall

touch-win

Package Overview
Dependencies
3
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    touch-win

This package written in JavaScript allows you to use the Linux "touch" command on Windows.


Version published
Maintainers
1
Created

Readme

Source


Touch Win Logo

A tool that will allow you to create multiple files using the terminal in Windows.



If you think that touch-win is a great project, consider making a small donation to be able to continue creating more projects like this. GitHub Sponsor.



Touch Win is a cli program that helps you create various files with a single command, it is inspired by the "touch" command found natively in Linux and Unix based operating systems. Even though there are several programs/packages in npmjs that help you get this command on Windows, I assure you that there is no one like it.

✨ Features

  • It allows you to generate multiple files with a single command.
  • Create folders automatically if they don't exist.
  • Allows you to generate files from a base path.
  • Allows you to generate files from a template.

📦 Installation

Install touch-win with your package manager:

npm install -g touch-win

🚀 Usage

touch-win --help
Usage: touch-win [options] [file ...]

Options:
      --version   Show version number                                                               [boolean]
  -h, --help      Show help                                                                         [boolean]
  -v, --verbose   Run with verbose logging                                         [boolean] [default: false]
  -b, --base      Base folder to place the file(s)                                                   [string]
  -t, --template  Template to generate files                                                         [string]
Examples:
  touch-win [options] [file ...]                                                   Create file(s)

  touch-win src/bin/cli.js src/helpers/file.js src/helpers/directory.js            Standard use

As you have seen, Touch Win has some options that will help you create a new file:

👨‍💻 With Base Option:

Forget to write the same path for the files you want to create with this option you can do it.

touch-win --base src/helpers/ alerts.js directory.js file.js
👨‍💻 With Template Option:

It has a similarity with the "Base" option, the difference arises when you only need small changes in the names or paths of the files.

touch-win --template config/webpack.[rf].js common dev build

Note: It's important to put [rf] where you want it to be replaced by the arguments.

More examples with "template"

Change extensions:

touch-win -t src/components/my_component.[rf] js css

Rename the file:

touch-win -t src/helpers/[rf].js alerts directory file

⚠️ WARNING: This package is still under development, so it may have some bugs.

Keywords

FAQs

Last updated on 12 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc