mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-10-14 02:15:32 +00:00
Add descriptive error handling to CustomCommand, update README, fix Uninstall Emoji that was rendering incorrectly, fix Item Editor line color for consistency, fix version number display
This commit is contained in:
1 parent
990fdf3d54
commit
7782e8b455
7 files changed
+91
-13
No files matched your search
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
import {
|
||||
readFileSync,
|
||||
writeFileSync
|
||||
} from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
interface PackageJson {
|
||||
version: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
// Read package.json to get version
|
||||
const packageJson = JSON.parse(readFileSync('package.json', 'utf-8')) as PackageJson;
|
||||
const version = packageJson.version;
|
||||
|
||||
// Read the bundled file
|
||||
const bundledFilePath = join('dist', 'ccstatusline.js');
|
||||
let bundledContent = readFileSync(bundledFilePath, 'utf-8');
|
||||
|
||||
// Replace the placeholder with the actual version
|
||||
bundledContent = bundledContent.replace(/__PACKAGE_VERSION__/g, version);
|
||||
|
||||
// Write back the modified content
|
||||
writeFileSync(bundledFilePath, bundledContent);
|
||||
|
||||
console.log(`✓ Replaced version placeholder with ${version}`);
|
||||
Reference in new issue
Block a user