make-folder-txt 1.0.1 โ 1.0.3
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 +118 -27
- package/bin/make-folder-txt.js +13 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# ๐ make-folder-txt
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Instantly dump your entire project into a single, readable `.txt` file.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/make-folder-txt)
|
|
8
|
+
[](https://www.npmjs.com/package/make-folder-txt)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
[](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
|
-
##
|
|
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
|
-
|
|
47
|
+
cd my-project
|
|
48
|
+
make-folder-txt
|
|
21
49
|
```
|
|
22
50
|
|
|
23
|
-
|
|
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
|
-
|
|
27
|
-
make-folder-txt
|
|
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
|
-
|
|
30
|
-
make-folder-txt "C:\Web Development\my-project" my-output.txt
|
|
65
|
+
**On macOS / Linux:**
|
|
31
66
|
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
โ โโโ
|
|
53
|
-
โ โโโ
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
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
|
-
|
|
180
|
+
</div>
|
package/bin/make-folder-txt.js
CHANGED
|
@@ -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(`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
|
|
78
|
-
|
|
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.
|
|
3
|
+
"version": "1.0.3",
|
|
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": {
|