make-folder-txt 1.0.1 โ†’ 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,12 +1,37 @@
1
- # make-folder-txt
1
+ <div align="center">
2
2
 
3
- Generate a single `.txt` file containing the **full folder structure** and **contents of every file** in your project โ€” perfect for sharing codebases with AI tools or teammates.
3
+ # ๐Ÿ“ make-folder-txt
4
4
 
5
- Automatically ignores `node_modules`, `.git`, `dist`, `build`, and binary files.
5
+ **Instantly dump your entire project into a single, readable `.txt` file.**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/make-folder-txt?color=crimson&style=flat-square)](https://www.npmjs.com/package/make-folder-txt)
8
+ [![npm downloads](https://img.shields.io/npm/dm/make-folder-txt?color=orange&style=flat-square)](https://www.npmjs.com/package/make-folder-txt)
9
+ [![license](https://img.shields.io/npm/l/make-folder-txt?color=blue&style=flat-square)](./LICENSE)
10
+ [![node](https://img.shields.io/node/v/make-folder-txt?color=green&style=flat-square)](https://nodejs.org)
11
+
12
+ Perfect for sharing your codebase with **AI tools**, **teammates**, or **code reviewers** โ€” without zipping files or giving repo access.
13
+
14
+ [Installation](#-installation) ยท [Usage](#-usage) ยท [Output Format](#-output-format) ยท [What Gets Skipped](#-what-gets-skipped) ยท [Contributing](#-contributing)
15
+
16
+ </div>
6
17
 
7
18
  ---
8
19
 
9
- ## Installation
20
+ ## โœจ Why make-folder-txt?
21
+
22
+ Ever needed to share your entire project with ChatGPT, Claude, or a teammate โ€” but copy-pasting every file one by one is painful? **make-folder-txt** solves that in one command.
23
+
24
+ - โœ… Run it from any project directory โ€” no arguments needed
25
+ - โœ… Generates a clean folder tree + every file's content
26
+ - โœ… Automatically skips `node_modules`, binaries, and junk files
27
+ - โœ… Zero dependencies โ€” pure Node.js
28
+ - โœ… Works on Windows, macOS, and Linux
29
+
30
+ ---
31
+
32
+ ## ๐Ÿ“ฆ Installation
33
+
34
+ Install globally once, use anywhere:
10
35
 
11
36
  ```bash
12
37
  npm install -g make-folder-txt
@@ -14,28 +39,42 @@ npm install -g make-folder-txt
14
39
 
15
40
  ---
16
41
 
17
- ## Usage
42
+ ## ๐Ÿš€ Usage
43
+
44
+ Navigate into your project folder and run:
18
45
 
19
46
  ```bash
20
- make-folder-txt <folder-path> [output-file.txt]
47
+ cd my-project
48
+ make-folder-txt
21
49
  ```
22
50
 
23
- ### Examples
51
+ That's it. A `my-project.txt` file will be created in the same directory.
52
+
53
+ ---
54
+
55
+ ## ๐ŸŽฏ Real World Examples
56
+
57
+ **Sharing with an AI tool (ChatGPT, Claude, etc.):**
24
58
 
25
59
  ```bash
26
- # Basic โ€” output saved as <folder-name>.txt in current directory
27
- make-folder-txt "C:\Web Development\my-project"
60
+ cd "C:\Web Development\my-app\backend"
61
+ make-folder-txt
62
+ # โ†’ backend.txt created, ready to paste into any AI chat
63
+ ```
28
64
 
29
- # Custom output file name
30
- make-folder-txt "C:\Web Development\my-project" my-output.txt
65
+ **On macOS / Linux:**
31
66
 
32
- # On Mac/Linux
33
- make-folder-txt /home/user/my-project
67
+ ```bash
68
+ cd /home/user/projects/my-app
69
+ make-folder-txt
70
+ # โ†’ my-app.txt created
34
71
  ```
35
72
 
36
73
  ---
37
74
 
38
- ## Output Format
75
+ ## ๐Ÿ“„ Output Format
76
+
77
+ The generated `.txt` file is structured in two clear sections:
39
78
 
40
79
  ```
41
80
  ================================================================================
@@ -49,13 +88,16 @@ Root: C:\Web Development\my-project
49
88
 
50
89
  my-project/
51
90
  โ”œโ”€โ”€ src/
52
- โ”‚ โ”œโ”€โ”€ index.js
53
- โ”‚ โ””โ”€โ”€ utils.js
91
+ โ”‚ โ”œโ”€โ”€ controllers/
92
+ โ”‚ โ”‚ โ””โ”€โ”€ userController.js
93
+ โ”‚ โ”œโ”€โ”€ models/
94
+ โ”‚ โ”‚ โ””โ”€โ”€ User.js
95
+ โ”‚ โ””โ”€โ”€ index.js
54
96
  โ”œโ”€โ”€ node_modules/ [skipped]
55
97
  โ”œโ”€โ”€ package.json
56
98
  โ””โ”€โ”€ README.md
57
99
 
58
- Total files: 4
100
+ Total files: 5
59
101
 
60
102
  ================================================================================
61
103
  FILE CONTENTS
@@ -64,7 +106,16 @@ FILE CONTENTS
64
106
  --------------------------------------------------------------------------------
65
107
  FILE: /src/index.js
66
108
  --------------------------------------------------------------------------------
67
- ... file content here ...
109
+ const express = require('express');
110
+ ...
111
+
112
+ --------------------------------------------------------------------------------
113
+ FILE: /package.json
114
+ --------------------------------------------------------------------------------
115
+ {
116
+ "name": "my-project",
117
+ ...
118
+ }
68
119
 
69
120
  ================================================================================
70
121
  END OF FOLDER: my-project
@@ -73,17 +124,57 @@ END OF FOLDER: my-project
73
124
 
74
125
  ---
75
126
 
76
- ## What Gets Skipped
127
+ ## ๐Ÿšซ What Gets Skipped
77
128
 
78
- | Type | Details |
79
- |------|---------|
80
- | Folders | `node_modules`, `.git`, `.next`, `dist`, `build`, `.cache` |
81
- | Binary files | Images, fonts, zips, executables, media |
82
- | Large files | Any file over 500 KB |
83
- | System files | `.DS_Store`, `Thumbs.db`, `desktop.ini` |
129
+ The tool is smart about what it ignores so your output stays clean and readable.
130
+
131
+ | Category | Details |
132
+ | --------------- | -------------------------------------------------------------- |
133
+ | ๐Ÿ“ Folders | `node_modules`, `.git`, `.next`, `dist`, `build`, `.cache` |
134
+ | ๐Ÿ–ผ๏ธ Binary files | Images (`.png`, `.jpg`, `.gif`...), fonts, videos, executables |
135
+ | ๐Ÿ“ฆ Archives | `.zip`, `.tar`, `.gz`, `.rar`, `.7z` |
136
+ | ๐Ÿ”ค Font files | `.woff`, `.woff2`, `.ttf`, `.eot`, `.otf` |
137
+ | ๐Ÿ“‹ Lock files | `package-lock.json`, `yarn.lock` |
138
+ | ๐Ÿ“ Large files | Any file over **500 KB** |
139
+ | ๐Ÿ—‘๏ธ System files | `.DS_Store`, `Thumbs.db`, `desktop.ini` |
140
+
141
+ Binary and skipped files are noted in the output as `[binary / skipped]` so you always know what was omitted.
142
+
143
+ ---
144
+
145
+ ## ๐Ÿ› ๏ธ Requirements
146
+
147
+ - **Node.js** v14.0.0 or higher
148
+ - No other dependencies
149
+
150
+ ---
151
+
152
+ ## ๐Ÿค Contributing
153
+
154
+ Contributions, issues, and feature requests are welcome!
155
+
156
+ 1. Fork the repository
157
+ 2. Create your feature branch: `git checkout -b feature/my-feature`
158
+ 3. Commit your changes: `git commit -m 'Add my feature'`
159
+ 4. Push to the branch: `git push origin feature/my-feature`
160
+ 5. Open a Pull Request
161
+
162
+ ---
163
+
164
+ ## ๐Ÿ‘ค Author
165
+
166
+ **AnnonymousThinker**
84
167
 
85
168
  ---
86
169
 
87
- ## License
170
+ ## ๐Ÿ“ License
171
+
172
+ This project is licensed under the **MIT License** โ€” feel free to use it in personal and commercial projects.
173
+
174
+ ---
175
+
176
+ <div align="center">
177
+
178
+ If this tool saved you time, consider giving it a โญ on npm!
88
179
 
89
- MIT
180
+ </div>
@@ -2,6 +2,7 @@
2
2
 
3
3
  const fs = require("fs");
4
4
  const path = require("path");
5
+ const { version } = require("../package.json");
5
6
 
6
7
  // โ”€โ”€ config โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
7
8
  const IGNORE_DIRS = new Set(["node_modules", ".git", ".next", "dist", "build", ".cache"]);
@@ -70,12 +71,21 @@ function readContent(absPath) {
70
71
 
71
72
  // โ”€โ”€ main โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
72
73
 
74
+ const args = process.argv.slice(2);
75
+
76
+ if (args.includes("-v") || args.includes("--version")) {
77
+ console.log(`make-folder-txt v${version}`);
78
+ console.log("Built by Muhammad Saad Amin");
79
+ process.exit(0);
80
+ }
81
+
73
82
  const folderPath = process.cwd();
74
83
 
75
84
  const rootName = path.basename(folderPath);
76
85
 
77
- const outputFile = process.argv[3]
78
- ? path.resolve(process.argv[3])
86
+ const outputArg = args.find(arg => !arg.startsWith("-"));
87
+ const outputFile = outputArg
88
+ ? path.resolve(outputArg)
79
89
  : path.join(process.cwd(), `${rootName}.txt`);
80
90
 
81
91
  console.log(`\n๐Ÿ“‚ Scanning: ${folderPath}`);
@@ -125,4 +135,4 @@ const sizeKB = (fs.statSync(outputFile).size / 1024).toFixed(1);
125
135
  console.log(`โœ… Done!`);
126
136
  console.log(`๐Ÿ“„ Output : ${outputFile}`);
127
137
  console.log(`๐Ÿ“Š Size : ${sizeKB} KB`);
128
- console.log(`๐Ÿ—‚๏ธ Files : ${filePaths.length}\n`);
138
+ console.log(`๐Ÿ—‚๏ธ Files : ${filePaths.length}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "make-folder-txt",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Generate a single .txt file containing the full folder structure and file contents of any project, ignoring node_modules and other junk.",
5
5
  "main": "bin/make-folder-txt.js",
6
6
  "bin": {