torch-it 2.3.0 → 2.3.1
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 +29 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Well better still - try torching it 🔥🔥🔥🔥🔥🔥
|
|
|
18
18
|
|
|
19
19
|
## What does `torch-it` do?
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Intelligently nukes your local caches, dependencies, and Docker environment depending on your framework and package manager — then rebuilds everything from a clean slate, **with a single command**.
|
|
22
22
|
|
|
23
23
|
It's surprising how often this just fixes things. 🤞
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ It's surprising how often this just fixes things. 🤞
|
|
|
28
28
|
- **Fully customizable** — specify any directories or files to delete
|
|
29
29
|
- **Docker support** — removes containers, images, and volumes and rebuilds from scratch 🐳
|
|
30
30
|
- **Cross-platform** — works on Windows, Linux, and macOS
|
|
31
|
-
- **Zero-dependency** — no additional packages required
|
|
31
|
+
- **Zero-dependency** — lightweight and no additional packages required
|
|
32
32
|
|
|
33
33
|
## Supported Frameworks
|
|
34
34
|
|
|
@@ -59,32 +59,47 @@ If your project includes either a `Dockerfile`, `docker-compose.yml`, or `docker
|
|
|
59
59
|
|
|
60
60
|
## Usage
|
|
61
61
|
|
|
62
|
-
###
|
|
62
|
+
### Global Installation (Recommended)
|
|
63
|
+
|
|
64
|
+
Install torch-it globally to run it from anywhere:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install -g torch-it
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then, in your project root,simply run:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
torch-it
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
For per-project customisation, create a `torchrc.json` file in your project root (see Customization section below).
|
|
77
|
+
|
|
78
|
+
### Per-Project Installation (Alternative)
|
|
79
|
+
|
|
80
|
+
If you prefer to install torch-it per project:
|
|
63
81
|
|
|
64
82
|
```bash
|
|
65
83
|
npm install torch-it --save-dev
|
|
66
84
|
```
|
|
67
85
|
|
|
68
|
-
|
|
86
|
+
Then run via npm scripts or npx:
|
|
69
87
|
|
|
70
|
-
Add
|
|
88
|
+
Add to package.json scripts:
|
|
71
89
|
|
|
72
90
|
```json
|
|
73
91
|
{
|
|
74
92
|
"scripts": {
|
|
75
|
-
"torch": "torch-it"
|
|
76
|
-
"torch:test": "torch-it --test"
|
|
93
|
+
"torch": "torch-it"
|
|
77
94
|
}
|
|
78
95
|
}
|
|
79
96
|
```
|
|
80
97
|
|
|
81
|
-
Then run:
|
|
82
|
-
|
|
83
98
|
```bash
|
|
84
99
|
npm run torch
|
|
85
100
|
```
|
|
86
101
|
|
|
87
|
-
|
|
102
|
+
Or directly:
|
|
88
103
|
|
|
89
104
|
```bash
|
|
90
105
|
npx torch-it
|
|
@@ -92,15 +107,15 @@ npx torch-it
|
|
|
92
107
|
|
|
93
108
|
### Dry Run (`--test`)
|
|
94
109
|
|
|
95
|
-
Use `--test` to preview what `torch-it` would do without deleting directories, cleaning caches, installing dependencies, or changing Docker resources.
|
|
110
|
+
Use `--test` to preview what `torch-it` would do without deleting directories, cleaning caches, installing dependencies, or changing Docker resources. Results are saved to the `torch-it.log` file.
|
|
96
111
|
|
|
97
112
|
```bash
|
|
98
|
-
|
|
113
|
+
torch-it --test
|
|
99
114
|
```
|
|
100
115
|
---
|
|
101
116
|
## Customization
|
|
102
117
|
|
|
103
|
-
For project-level customization
|
|
118
|
+
For project-level customization, create a local `torchrc.json` file in your project root with the following structure:
|
|
104
119
|
|
|
105
120
|
```json
|
|
106
121
|
{
|
|
@@ -116,7 +131,7 @@ For project-level customization (recommended), create `torchrc.json` in your pro
|
|
|
116
131
|
- `dockerMode`: Boolean flag to enable/disable Docker operations. Set to `false` to skip all Docker cleanup, rebuild, and launch steps. Defaults to `true`.
|
|
117
132
|
- `logfile`: Boolean flag to enable or disable writing runtime output to `torch-it.log`. Set to `false` to disable file logging. Defaults to `true`.
|
|
118
133
|
|
|
119
|
-
**Note**: The `torchrc.json` file is completely optional. torch-it works with sensible defaults out of the box. Only create this file if you need to customize the behavior.
|
|
134
|
+
**Note**: The local `torchrc.json` file is completely optional. torch-it works with sensible defaults out of the box. Only create this file if you need to customize the behavior.
|
|
120
135
|
|
|
121
136
|
|
|
122
137
|
## Logging
|