Skip to content

Commit

Permalink
fix(node): package_name command also return package name & copy it
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens committed May 29, 2024
1 parent ecb63a1 commit 12bd953
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions zsh/extends/.zshrc.extends.npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ 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
# Get & copy current working directory package name
function package_name() {
local packageName=$(cat package.json | jq '.name')

echo $packageName | pbcopy
echo $packageName
}

# Clear all node_modules and reinstall
Expand Down

0 comments on commit 12bd953

Please sign in to comment.