touch-win
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -7,3 +7,3 @@ #!/usr/bin/env node | ||
const argv = require("./src/bin/cli"); | ||
const argv = require("./src/bin/cli").argv; | ||
const createFile = require("./src/helpers/file"); | ||
@@ -10,0 +10,0 @@ const createDirectory = require("./src/helpers/directory"); |
{ | ||
"name": "touch-win", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "This package written in JavaScript allows you to use the Linux \"touch\" command on Windows.", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -1,20 +0,62 @@ | ||
# 🧑💻 Touch Win | ||
<br> | ||
<br> | ||
> 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. <a href="https://github.com/sponsors/zitrocode">GitHub Sponsor</a>. | ||
<!-- Basic information --> | ||
<div align="center"> | ||
<a href="github.com/zitrocode/touch-win"> | ||
<img src="./images/touch-win-logo.png" alt="Touch Win Logo"> | ||
</a> | ||
<!-- <h3>Touch Win</h3> --> | ||
<br> | ||
<p> | ||
A tool that will allow you to create multiple files using the terminal in Windows. | ||
</p> | ||
<div align="center"> | ||
<a href="https://github.com/sponsors/zitrocode"> | ||
<img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/zitrocode?color=green&style=flat-square"> | ||
</a> | ||
<a href="https://github.com/zitrocode/touch-win/network"> | ||
<img alt="GitHub forks" src="https://img.shields.io/github/forks/zitrocode/touch-win?style=flat-square"> | ||
</a> | ||
<a href="https://github.com/zitrocode/touch-win/stargazers"> | ||
<img alt="GitHub stars" src="https://img.shields.io/github/stars/zitrocode/touch-win?style=flat-square"> | ||
</a> | ||
<a href="https://github.com/zitrocode/touch-win/issues"> | ||
<img alt="GitHub issues" src="https://img.shields.io/github/issues/zitrocode/touch-win?color=yellow&style=flat-square"> | ||
</a> | ||
<a href="https://github.com/zitrocode/touch-win/blob/master/LICENSE"> | ||
<img alt="GitHub license" src="https://img.shields.io/github/license/zitrocode/touch-win?style=flat-square"> | ||
</a> | ||
<a href="https://www.linkedin.com/in/zitrocode"> | ||
<img alt="npm" src="https://img.shields.io/npm/v/touch-win?style=flat-square"> | ||
</a> | ||
</div> | ||
<br> | ||
<div align="center"> | ||
<a href="https://github.com/zitrocode/touch-win/issues"> | ||
<strong>Report Bug</strong> | ||
</a> | ||
· | ||
<a href="https://github.com/zitrocode/touch-win/issues"> | ||
<strong>Request Feature</strong> | ||
</a> | ||
</div> | ||
</div> | ||
--- | ||
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. | ||
<div align="center"> | ||
<img src="./images/touch-win.jpg" width="90%"> | ||
</div> | ||
<br> | ||
![image](./touch-win-screenshot.jpg) | ||
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](https://npmjs.com) that help you get this command on Windows, **I assure you that there is no one like it**. | ||
## ✨ 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. | ||
- 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. | ||
<!-- ## ⚡️ Requirements --> | ||
## 📦 Installation | ||
@@ -24,4 +66,2 @@ | ||
#### NPM | ||
```bash | ||
@@ -41,7 +81,7 @@ npm install -g touch-win | ||
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] | ||
--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: | ||
@@ -51,11 +91,6 @@ 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 | ||
As you have seen, **Touch Win** has some options that will help you create a new file: | ||
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 | ||
@@ -104,2 +139,2 @@ | ||
**⚠️ WARNING:** This package is still under development, so it may have some bugs. | ||
⚠️ **WARNING**: This package is still under development, so it may have some bugs. |
const yargs = require("yargs") | ||
const { hideBin } = require("yargs/helpers"); | ||
yargs(process.argv.slice(2)) | ||
yargs(hideBin(process.argv)) | ||
.usage("Usage: touch-win [options] [file ...]") | ||
@@ -28,5 +29,4 @@ .example("touch-win [options] [file ...]", "Create file(s)") | ||
describe: "Template to generate files" | ||
}) | ||
.argv; | ||
}); | ||
module.exports = yargs; |
38678
11
137