@chriswiegman/hugo-tools 0.1.1 → 0.1.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/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/src/extract-tags.js +1 -1
- package/src/vscode.js +32 -28
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|
6
6
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
|
7
7
|
|
|
8
|
+
## 0.1.2 - 2026-05-04
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* VS Code command also does initial tag extraction.
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* Ensure VS Code tasks run on appropriate JS targets
|
|
17
|
+
|
|
8
18
|
## 0.1.1 - 2026-05-04
|
|
9
19
|
|
|
10
20
|
### Features
|
package/package.json
CHANGED
package/src/extract-tags.js
CHANGED
package/src/vscode.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* vscode
|
|
8
8
|
*
|
|
9
9
|
* Writes to <vscodeDir>/ (default .vscode/):
|
|
10
|
-
* tasks.json — tasks for draft, add-tags, publish, pick-image
|
|
10
|
+
* tasks.json — tasks for draft, extract-tags, add-tags, publish, pick-image
|
|
11
11
|
* extensions.json — recommended extensions
|
|
12
12
|
* settings.json — markdown editor settings
|
|
13
13
|
*
|
|
@@ -17,42 +17,44 @@
|
|
|
17
17
|
const fs = require('fs');
|
|
18
18
|
const path = require('path');
|
|
19
19
|
const { requireHugoSite, vscodeDir } = require('./config');
|
|
20
|
+
const { main: extractTags } = require('./extract-tags');
|
|
20
21
|
|
|
21
22
|
const TASKS = {
|
|
22
|
-
version:
|
|
23
|
-
tasks: [
|
|
23
|
+
"version": "2.0.0",
|
|
24
|
+
"tasks": [
|
|
24
25
|
{
|
|
25
|
-
label:
|
|
26
|
-
type:
|
|
27
|
-
command:
|
|
28
|
-
problemMatcher: []
|
|
26
|
+
"label": "Create Draft",
|
|
27
|
+
"type": "shell",
|
|
28
|
+
"command": "npx draft",
|
|
29
|
+
"problemMatcher": []
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
|
-
label:
|
|
32
|
-
type:
|
|
33
|
-
command:
|
|
34
|
-
problemMatcher: []
|
|
32
|
+
"label": "Add Tags",
|
|
33
|
+
"type": "shell",
|
|
34
|
+
"command": "npx add-tags",
|
|
35
|
+
"problemMatcher": []
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
|
-
label:
|
|
38
|
-
type:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
problemMatcher: [],
|
|
38
|
+
"label": "Publish Draft (now)",
|
|
39
|
+
"type": "shell",
|
|
40
|
+
"command": "output=$(npx publish \"${relativeFile}\" now); echo \"$output\"; newFile=$(echo \"$output\" | grep -oE 'content/[^ ]+\\.md'); [ -n \"$newFile\" ] && code -r \"${workspaceFolder}/$newFile\"",
|
|
41
|
+
"problemMatcher": []
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
label:
|
|
45
|
-
type:
|
|
46
|
-
command:
|
|
47
|
-
problemMatcher: []
|
|
44
|
+
"label": "Publish Draft (later)",
|
|
45
|
+
"type": "shell",
|
|
46
|
+
"command": "read -p \"Publish date (YYYY-MM-DD): \" d; output=$(npx publish \"${relativeFile}\" later \"$d\"); echo \"$output\"; newFile=$(echo \"$output\" | grep -oE 'content/[^ ]+\\.md'); [ -n \"$newFile\" ] && code -r \"${workspaceFolder}/$newFile\"",
|
|
47
|
+
"problemMatcher": []
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
label:
|
|
51
|
-
type:
|
|
52
|
-
command:
|
|
53
|
-
problemMatcher: [],
|
|
54
|
-
presentation: {
|
|
55
|
-
|
|
50
|
+
"label": "Pick Image",
|
|
51
|
+
"type": "shell",
|
|
52
|
+
"command": "npx pick-image",
|
|
53
|
+
"problemMatcher": [],
|
|
54
|
+
"presentation": {
|
|
55
|
+
"focus": true
|
|
56
|
+
}
|
|
57
|
+
}
|
|
56
58
|
],
|
|
57
59
|
};
|
|
58
60
|
|
|
@@ -93,9 +95,11 @@ function main() {
|
|
|
93
95
|
const dir = path.join(process.cwd(), vscodeDir);
|
|
94
96
|
fs.mkdirSync(dir, { recursive: true });
|
|
95
97
|
|
|
96
|
-
writeIfAbsent(path.join(dir, 'tasks.json'),
|
|
98
|
+
writeIfAbsent(path.join(dir, 'tasks.json'), JSON.stringify(TASKS, null, 2) + '\n');
|
|
97
99
|
writeIfAbsent(path.join(dir, 'extensions.json'), JSON.stringify(EXTENSIONS, null, 2) + '\n');
|
|
98
|
-
writeIfAbsent(path.join(dir, 'settings.json'),
|
|
100
|
+
writeIfAbsent(path.join(dir, 'settings.json'), JSON.stringify(SETTINGS, null, 2) + '\n');
|
|
101
|
+
|
|
102
|
+
extractTags();
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
main();
|