@thi.ng/tangle 1.1.33 → 1.1.34
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/CHANGELOG.md +7 -1
- package/README.md +16 -16
- package/cli.js +13 -15
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-08-
|
|
3
|
+
- **Last updated**: 2025-08-06T18:02:31Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [1.1.34](https://github.com/thi-ng/umbrella/tree/@thi.ng/tangle@1.1.34) (2025-08-06)
|
|
15
|
+
|
|
16
|
+
#### ♻️ Refactoring
|
|
17
|
+
|
|
18
|
+
- update CLI internals, rename `--debug` => `--verbose` ([5756b75](https://github.com/thi-ng/umbrella/commit/5756b75))
|
|
19
|
+
|
|
14
20
|
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/tangle@1.1.0) (2025-02-11)
|
|
15
21
|
|
|
16
22
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -189,24 +189,24 @@ lib.md (e.g. maybe a library of useful snippets for a larger project):
|
|
|
189
189
|
Calling the `tangle` CLI util, we can process these example files and produce
|
|
190
190
|
the following two outputs:
|
|
191
191
|
|
|
192
|
-
```
|
|
192
|
+
```text
|
|
193
193
|
npx @thi.ng/tangle --help
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
195
|
+
█ █ █ │
|
|
196
|
+
██ █ │
|
|
197
|
+
█ █ █ █ █ █ █ █ │ @thi.ng/tangle v1.1.33
|
|
198
|
+
█ █ █ █ █ █ █ █ █ │ Literate programming code block tangling
|
|
199
|
+
█ │
|
|
200
|
+
█ █ │
|
|
201
|
+
|
|
202
|
+
usage: tangle [OPTS] SOURCE-FILES(S) ...
|
|
203
|
+
tangle --help
|
|
204
|
+
|
|
205
|
+
Flags:
|
|
206
|
+
|
|
207
|
+
--dry-run Dry run (no changes applied)
|
|
208
|
+
--no-comments don't generate comments
|
|
209
|
+
-v, --verbose Display extra information
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
```bash
|
package/cli.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ARG_DRY_RUN,
|
|
3
|
+
ARG_VERBOSE,
|
|
2
4
|
ParseError,
|
|
5
|
+
THING_HEADER,
|
|
3
6
|
flag,
|
|
4
7
|
parse,
|
|
5
8
|
usage
|
|
@@ -9,26 +12,21 @@ import { ConsoleLogger } from "@thi.ng/logger";
|
|
|
9
12
|
import { join } from "node:path";
|
|
10
13
|
import { tangleFile } from "./tangle.js";
|
|
11
14
|
const argOpts = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
default: false,
|
|
16
|
-
desc: "enable dry run (don't overwrite files)"
|
|
17
|
-
})
|
|
15
|
+
...ARG_DRY_RUN,
|
|
16
|
+
...ARG_VERBOSE,
|
|
17
|
+
noComments: flag({ default: false, desc: "don't generate comments" })
|
|
18
18
|
};
|
|
19
19
|
const PKG = readJSON(join(process.argv[2], "package.json"));
|
|
20
20
|
const APP_NAME = PKG.name.split("/")[1];
|
|
21
|
-
const HEADER =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
\u2588 \u2502
|
|
27
|
-
\u2588 \u2588 \u2502
|
|
28
|
-
`;
|
|
21
|
+
const HEADER = THING_HEADER(
|
|
22
|
+
PKG.name,
|
|
23
|
+
PKG.version,
|
|
24
|
+
"Literate programming code block tangling"
|
|
25
|
+
);
|
|
29
26
|
const usageOpts = {
|
|
30
27
|
lineWidth: process.stdout.columns,
|
|
31
28
|
prefix: `${HEADER}
|
|
29
|
+
|
|
32
30
|
usage: ${APP_NAME} [OPTS] SOURCE-FILES(S) ...
|
|
33
31
|
${APP_NAME} --help
|
|
34
32
|
|
|
@@ -46,7 +44,7 @@ try {
|
|
|
46
44
|
const { result: opts, rest } = result;
|
|
47
45
|
if (!rest.length) showUsage();
|
|
48
46
|
let ctx = {
|
|
49
|
-
logger: new ConsoleLogger("tangle", opts.
|
|
47
|
+
logger: new ConsoleLogger("tangle", opts.verbose ? "DEBUG" : "INFO"),
|
|
50
48
|
opts: {
|
|
51
49
|
comments: opts.noComments !== true
|
|
52
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/tangle",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.34",
|
|
4
4
|
"description": "Literate programming code block tangling / codegen utility, inspired by org-mode & noweb",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@thi.ng/api": "^8.12.1",
|
|
44
|
-
"@thi.ng/args": "^2.
|
|
44
|
+
"@thi.ng/args": "^2.9.0",
|
|
45
45
|
"@thi.ng/checks": "^3.7.15",
|
|
46
46
|
"@thi.ng/compare": "^2.4.27",
|
|
47
47
|
"@thi.ng/date": "^2.7.61",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"thi.ng": {
|
|
104
104
|
"year": 2022
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "03e0d1024805407fbec5dde688b6178bbe0a2f3a\n"
|
|
107
107
|
}
|