Socket
Socket
Sign inDemoInstall

touch-win

Package Overview
Dependencies
86
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
Weekly downloads
5
Maintainers
1
Created
Weekly downloads
 

Readme

Source

🧑‍💻 Touch Win

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.


This project provides a simple and fast solution to create multiple files from a single command; Touch-win is inspired by the "touch" command found on Linux and UNIX based systems.

image

✨ Features

  • Allows you to create multiple files with a single command.
  • Automatically creates the necessary folders for the location of the file to create if it does not exist.
  • Allows you to create files from a base path.
  • Allows you to create files from a template.

📦 Installation

Install touch-win with your package manager:

NPM
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
  touch-win --base src/components/new_component Component.js Component.css         Use with option "base"
  touch-win --template src/components/new_component/Component.[rf] js test.js css  Use with option "template"
  touch-win --template config/webpack.[rf].js build dev common                     Use with option "template"

Base

This option allows you to create files from a base path, this will help you not to repeat the same path in each file.

Examples

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

# Return
successfully created "src\bin\cli.js"
successfully created "src\helpers\files.js"
successfully created "src\helpers\directory.js"
# Use with option "base"
touch-win --base src/components/new_component component.js style.sass

# return
successfully created "src\components\new_component\style.sass"
successfully created "src\components\new_component\component.js"
# Use with option "template"
touch-win --template src/components/NewComponent.[rf] js test.js css

# return
successfully created "src\components\NewComponent.js"
successfully created "src\components\NewComponent.test.js"
successfully created "src\components\NewComponent.css"
# Use with option "template"
touch-win --template config/webpack.[rf].js dev build common

# return
successfully created "config\webpack.dev.js"
successfully created "config\webpack.build.js"
successfully created "config\webpack.common.js"

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

Keywords

FAQs

Last updated on 11 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