Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git npm addons #102

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
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
22 changes: 17 additions & 5 deletions src/commands/install/config/apps-groups/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,26 @@ export const GIT_APPS: Readonly<IAppSetup[]> = [
deps: ['Git'],
},
{
name: 'Increase credential cache timeout',
description: 'Increase the cache time for using your credentials from Keychain - 1 month',
name: 'MacOS Keychain store credentials for HTTPS remotes',
description: 'Use macOS Keychain to store credentials',
group: 'git',
openUrl: () => `open https://git-scm.com/docs/git-credential-cache`,
openUrl: () => `open https://git-scm.com/docs/gitcredentials`,
commands: () => [
// avoid lock for other `git config` options
'sleep 2',
`git config --global credential.helper 'cache --timeout 2592000'`,
`git config --global credential.helper osxkeychain`,
],
deps: ['Git'],
},
{
name: 'Disable SSL',
description: 'Disable SSL for Git operations',
group: 'git',
openUrl: () => `open https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslVerify`,
commands: () => [
// avoid lock for other `git config` options
'sleep 3',
`git config http.sslVerify "false"`,
],
deps: ['Git'],
},
Expand All @@ -56,7 +68,7 @@ export const GIT_APPS: Readonly<IAppSetup[]> = [
openUrl: () => `open https://git-scm.com/docs/git-push#Documentation/git-push.txt-pushautoSetupRemote`,
commands: () => [
// avoid lock for other `git config` options
'sleep 3',
'sleep 4',
`git config --global --bool push.autoSetupRemote true`,
],
deps: ['Git'],
Expand Down
7 changes: 7 additions & 0 deletions zsh/extends/.zshrc.extends.npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ alias nsd="npm run start:dev"
alias nb="npm run build"
alias nt="npm run test"
alias nte="npm run test:e2e"

# Get current working directory package name
function package_name () {
cat package.json | jq '.name' | pbcopy
}

# Clear all node_modules and reinstall
function cnodem() {
npm ci --only=prod
npm ci
Expand Down