Files
dotfiles/home/hooks/.update_pre.ts
Ryan Walters 02b9236ecf feat: major dotfiles refactor with documentation and multi-platform improvements
- Add comprehensive CLAUDE.md with chezmoi best practices and AI assistant guidelines
- Restructure TODO.md with prioritized tasks and detailed organization
- Add PowerShell profile template for Windows platform support
- Split git configs into identity-specific templates (ryan/xevion)
- Convert nushell env.nu and gitconfig to templates for cross-platform rendering
- Refactor chezmoi hooks to TypeScript (.init_pre.ts, .update_pre.ts)
- Update .chezmoiignore with better platform-specific file handling
- Remove deprecated shellchecker.sh and tasks.json from VS Code config
- Add mise integration to shell configs (bash, zsh, nushell, PowerShell)
- Clean up commonrc.sh.tmpl WSL-specific code
- Disable Deno in VS Code settings, enable simple dialog mode
- Add nushell extension recommendation to VS Code

This commit establishes better cross-platform support (Windows/WSL/Linux),
improves documentation for future maintenance, and standardizes configuration
management patterns across the repository.
2025-10-26 17:01:45 -05:00

20 lines
568 B
TypeScript

#!/usr/bin/env bun
// chezmoi update --init does not invoke the 'hooks.init.pre' hook, so we do it ourselves
const chezmoiArgs = process.env.CHEZMOI_ARGS || '';
if (chezmoiArgs.includes('init')) {
// CHEZMOI_UPDATE is just a hint in case we need to know if we're updating
const scriptDir = import.meta.dir;
const initPreScript = `${scriptDir}/.init_pre.ts`;
await Bun.spawn(['bun', initPreScript], {
env: {
...process.env,
CHEZMOI_UPDATE: '1'
},
stdout: 'inherit',
stderr: 'inherit'
});
}