{"repo":"usmanyunusov/nano-staged","free":true,"listed":false,"github":"https://github.com/usmanyunusov/nano-staged","clone":"git clone https://github.com/usmanyunusov/nano-staged.git","description":"Tiny tool to run commands for modified, staged, and committed files in a GIT repository.","language":"JavaScript","stars":680,"topics":["git","staged","runner","lint","linter","task","unstaged","changed","diff"],"license":"MIT","category":"dev-tools","readme_excerpt":"Nano Staged Tiny tool to run commands for modified, staged, and committed files in a GIT repository. It helps speed up running of the tests, linters, scripts , and more. Features - 📦 Small : 52kB (2x+ lighter than lint-staged ). - 🥇 No dependencies - ☯️ Support multiple file states like staged, unstaged, last-commit, changed etc Benchmarks Benchmarks running time for 10 file: The space in node modules including sub-dependencies: The performance results were generated on a MBP Late 2013, 2.3 GHz Intel Core i7 by running npm run bench in the library folder. See bench/running-time/index.js Usage Getting Started 1. Install nano-staged : or 2. Add the nano-staged section and the commands to your package.json : For example: 3. Run commands with Nano Staged: Nano Staged by default to run commands from the config for staged files. Pre-commit Hook You can use Nano Staged with a pre-commit tools to run it automatically before every commit. Simple Git Hooks 1. Install simple-git-hooks as a dev dependency: 2. Add the simple-git-hooks section to your package.json and fill in the pre-commit : For example: 3. Run the CLI script to update the git hooks with the commands from the config: 4. To automatically have Git hooks enabled after install, edit package.json : Husky 1. Install husky as a dev dependency: 2. Enable Git hooks: 3. Add a command to a hook: 4. To automatically have Git hooks enabled after install, edit package.json : Configuration Nano Staged supports multiple ways to define ","default_branch":null,"files":null,"tree":[],"storefront":"/r/usmanyunusov","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/usmanyunusov/nano-staged/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}