|
3 | 3 |
|
4 | 4 | <!-- Basic information --> |
5 | 5 | <div align="center"> |
6 | | - <a href="github.com/zitrocode/touch-win"> |
| 6 | + <a href="https://github.com/zitrocode/touch-win"> |
7 | 7 | <img src="./images/touch-win-logo.png" alt="Touch Win Logo"> |
8 | 8 | </a> |
9 | 9 | <!-- <h3>Touch Win</h3> --> |
|
45 | 45 |
|
46 | 46 | --- |
47 | 47 |
|
| 48 | +> 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>. |
| 49 | +
|
| 50 | +<br> |
48 | 51 | <div align="center"> |
49 | | - <img src="./images/touch-win.jpg" width="90%"> |
| 52 | + <img src="./images/Touch Win.png" width="90%" style="border-radius: 10px;"> |
50 | 53 | </div> |
51 | 54 | <br> |
52 | 55 |
|
53 | | -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**. |
| 56 | +**[Touch Win](https://github.com/zitrocode)** 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**. |
54 | 57 |
|
55 | 58 | ## ✨ Features |
56 | 59 |
|
@@ -90,46 +93,39 @@ Examples: |
90 | 93 |
|
91 | 94 | As you have seen, **Touch Win** has some options that will help you create a new file: |
92 | 95 |
|
93 | | -### Examples |
| 96 | +#### 👨💻 With Base Option: |
94 | 97 |
|
95 | | -```bash |
96 | | -# Standard use |
97 | | -touch-win src/bin/cli.js src/helpers/file.js src/helpers/directory.js |
| 98 | +Forget to write the same path for the files you want to create with this option you can do it. |
98 | 99 |
|
99 | | -# Return |
100 | | -successfully created "src\bin\cli.js" |
101 | | -successfully created "src\helpers\files.js" |
102 | | -successfully created "src\helpers\directory.js" |
| 100 | +```bash |
| 101 | +touch-win --base src/helpers/ alerts.js directory.js file.js |
103 | 102 | ``` |
104 | 103 |
|
105 | | -```bash |
106 | | -# Use with option "base" |
107 | | -touch-win --base src/components/new_component component.js style.sass |
| 104 | +#### 👨💻 With Template Option: |
108 | 105 |
|
109 | | -# return |
110 | | -successfully created "src\components\new_component\style.sass" |
111 | | -successfully created "src\components\new_component\component.js" |
112 | | -``` |
| 106 | +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. |
113 | 107 |
|
114 | 108 | ```bash |
115 | | -# Use with option "template" |
116 | | -touch-win --template src/components/NewComponent.[rf] js test.js css |
117 | | - |
118 | | -# return |
119 | | -successfully created "src\components\NewComponent.js" |
120 | | -successfully created "src\components\NewComponent.test.js" |
121 | | -successfully created "src\components\NewComponent.css" |
| 109 | +touch-win --template config/webpack.[rf].js common dev build |
122 | 110 | ``` |
123 | 111 |
|
124 | | -```bash |
125 | | -# Use with option "template" |
126 | | -touch-win --template config/webpack.[rf].js dev build common |
| 112 | +**Note:** It's important to put `[rf]` where you want it to be replaced by the arguments. |
127 | 113 |
|
128 | | -# return |
129 | | -successfully created "config\webpack.dev.js" |
130 | | -successfully created "config\webpack.build.js" |
131 | | -successfully created "config\webpack.common.js" |
132 | | -``` |
| 114 | +<details> |
| 115 | + <summary>More examples with "template"</summary> |
| 116 | + |
| 117 | + <br> |
| 118 | + <p><strong>Change extensions:</strong></p> |
| 119 | + <code> |
| 120 | + touch-win -t src/components/my_component.[rf] js css |
| 121 | + </code> |
| 122 | + |
| 123 | + <br> |
| 124 | + <p><strong>Rename the file:</strong></p> |
| 125 | + <code> |
| 126 | + touch-win -t src/helpers/[rf].js alerts directory file |
| 127 | + </code> |
| 128 | +</details> |
133 | 129 |
|
134 | 130 | --- |
135 | 131 |
|
|
0 commit comments