tauri/.husky/pre-commit
Amr Bashir 01f6aa3405
build: migrate repo to use pnpm as the package manager (#10607)
* build: migrate repo to use `pnpm` as the pacakge manager

* corepack enable

* update lock file

* format files

* format .github

* fix audit js

* wrap in quotes

* --frozen-lockfile

* simplify packageManager field

* lockfile

* remove cache from audit workflow
2024-08-16 23:04:08 -03:00

25 lines
526 B
Bash
Executable File

#!/bin/sh
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
. "$(dirname "$0")/_/husky.sh"
if [ -z "$(git diff --name-only tooling/api)" ]; then
echo "skipping api - no changes detected"
else
cd tooling/api
pnpm format
pnpm eslint:fix
cd ../..
fi
if [ -z "$(git diff --name-only tooling/cli/node)" ]; then
echo "skipping \`@tauri-apps/cli\` - no changes detected"
else
cd tooling/cli/node
pnpm format
cd ../../..
fi