@k2works/claude-code-booster 0.1.0 → 0.1.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/lib/assets/package-lock.json +984 -3304
- package/lib/assets/package.json +1 -1
- package/lib/assets/scripts/mkdocs.js +92 -55
- package/package.json +1 -1
package/lib/assets/package.json
CHANGED
|
@@ -1,59 +1,96 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {execSync} from 'child_process';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @type {boolean} Windows環境かどうかをチェック
|
|
9
|
+
*/
|
|
10
|
+
const isWindows = process.platform === 'win32';
|
|
4
11
|
|
|
5
12
|
// Function to register the mkdocs:serve task
|
|
6
|
-
export default function(gulp) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
13
|
+
export default function (gulp) {
|
|
14
|
+
// Helper function to remove site directory
|
|
15
|
+
const removeSiteDirectory = () => {
|
|
16
|
+
const siteDir = path.join(process.cwd(), 'site');
|
|
17
|
+
if (fs.existsSync(siteDir)) {
|
|
18
|
+
console.log('Removing existing site directory...');
|
|
19
|
+
fs.rmSync(siteDir, {recursive: true, force: true});
|
|
20
|
+
console.log('Site directory removed successfully!');
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// MkDocs serve task
|
|
25
|
+
gulp.task('mkdocs:serve', (done) => {
|
|
26
|
+
try {
|
|
27
|
+
console.log('Starting MkDocs server using Docker Compose...');
|
|
28
|
+
|
|
29
|
+
// Execute docker-compose up command to start mkdocs service
|
|
30
|
+
execSync('docker compose up -d mkdocs', {stdio: 'inherit'});
|
|
31
|
+
|
|
32
|
+
console.log('\nMkDocs server started successfully!');
|
|
33
|
+
console.log('Documentation is now available at http://localhost:8000');
|
|
34
|
+
console.log('Press Ctrl+C to stop the server when done.');
|
|
35
|
+
|
|
36
|
+
done();
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error('Error starting MkDocs server:', error.message);
|
|
39
|
+
done(error);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// MkDocs build task
|
|
44
|
+
gulp.task('mkdocs:build', (done) => {
|
|
45
|
+
try {
|
|
46
|
+
console.log('Building MkDocs documentation...');
|
|
47
|
+
|
|
48
|
+
// Remove existing site directory before building
|
|
49
|
+
removeSiteDirectory();
|
|
50
|
+
|
|
51
|
+
// Execute docker-compose run command to build mkdocs documentation
|
|
52
|
+
execSync('docker compose run --rm mkdocs mkdocs build', {stdio: 'inherit'});
|
|
53
|
+
|
|
54
|
+
console.log('\nMkDocs documentation built successfully!');
|
|
55
|
+
|
|
56
|
+
done();
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error('Error building MkDocs documentation:', error.message);
|
|
59
|
+
done(error);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// MkDocs stop task
|
|
64
|
+
gulp.task('mkdocs:stop', (done) => {
|
|
65
|
+
try {
|
|
66
|
+
console.log('Stopping MkDocs server...');
|
|
67
|
+
|
|
68
|
+
// Execute docker-compose down command to stop mkdocs service
|
|
69
|
+
execSync('docker compose down', {stdio: 'inherit'});
|
|
70
|
+
|
|
71
|
+
console.log('MkDocs server stopped successfully!');
|
|
72
|
+
|
|
73
|
+
done();
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error('Error stopping MkDocs server:', error.message);
|
|
76
|
+
done(error);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// MkDocs open task
|
|
81
|
+
gulp.task('mkdocs:open', (done) => {
|
|
82
|
+
try {
|
|
83
|
+
console.log('Opening MkDocs server...');
|
|
84
|
+
|
|
85
|
+
const command = isWindows ? 'start http://localhost:8000' : 'open http://localhost:8000';
|
|
86
|
+
execSync(command, {stdio: 'inherit'});
|
|
87
|
+
|
|
88
|
+
console.log('MkDocs server opened successfully!');
|
|
89
|
+
|
|
90
|
+
done();
|
|
91
|
+
} catch (error) {
|
|
92
|
+
console.error('Error opening MkDocs server:', error.message);
|
|
93
|
+
done(error);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|