From f7df3d8f24a0571b1766e6187d2305fdf566b08a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Sun, 17 Apr 2022 23:46:45 +0900 Subject: [PATCH] chore(repo): Make git commit faster (#4353) --- .husky/pre-commit | 8 ++++---- CONTRIBUTING.md | 23 ++++++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 3dc4f7159a5..ccea9f470c6 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -3,9 +3,9 @@ yarn lint-staged - -if command -v find &> /dev/null +# Remove empty directories +if command -v fd &> /dev/null then - find . -name '.DS_Store' -type f -delete - find . -type d -empty -delete + fd -H '^\.DS_Store$' -tf -X rm + fd -te -td -X rmdir fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 683941d93be..105865a93f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,18 @@ Steps to get started: ## Getting your development environment set up -After cloning the project there are a few steps required to get the project running. +### Optional CLI tools + +CLI tools below will help development. +Note that these tools are optional. + +- [fd](https://github.com/sharkdp/fd) + +This is used for performant file operations in git hooks. + +--- + +After cloning the project there are a few steps required to get the project running. For running all tests, take the following steps: 1. Fetch submodules to pull ECMAScript test suites. @@ -76,7 +87,7 @@ For running all tests, take the following steps: 2. Install js dependencies. Ensure [Yarn Package Manager is installed](https://yarnpkg.com/getting-started/install) - + ```bash yarn ``` @@ -95,7 +106,7 @@ For running all tests, take the following steps: 5. Add wasm32-wasi target - `rustup target add wasm32-wasi` + `rustup target add wasm32-wasi` 6. Ensure you're using Node.JS >= 16 @@ -106,10 +117,12 @@ For running all tests, take the following steps: ```bash cargo test --all --no-default-features --features swc_v1 ``` + Or + ```bash - cargo test --all --no-default-features --features swc_v2 - ``` + cargo test --all --no-default-features --features swc_v2 + ``` ## Running tests per package