
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
build-ignore
Advanced tools
A script that generates a .gitignore based on branch name for when different .gitignores are needed
Generate branch specific .gitignore.
yarn add build-ignore -D
or
npm i build-ignore -D
In order to use build-ignore you will need to create a gitignores directory with a text file using the name of your branch specific gitignore as well as your regular(master) gitingore.
- ./gitignores
|_ gitingore_master.txt
|_ gitingore_specialBranch.txt
From your terminal run ./node_modules/.bin/build-ignore
. It will check the current branch and look for it in the gitignores folder. If one is not found it will create one using the gitingore_master.txt file. Must add .gitignore to each gitignore text file in order to avoid having to mess with tracking of actual .gitignore.
Use as a post-checkout git hook to have build-ignore run automatically when changing branches by adding the following to the .git/hooks
directory:
#.git/hooks/post-checkout
#!/bin/sh
BRANCH_SWITCH="$3"
#check if it was a branch checkout
if [[ $BRANCH_SWITCH -eq 1 ]]
then
./node_modules/.bin/build-ignore
fi
Alternatively, you can use a githooks module like husky and add the following to your package.json scripts section.
{
"scripts": {
"postcheckout": "./node_modules/.bin/build-ignore,
}
}
FAQs
A post-checkout hook script that generates branch specific .gitignore files
The npm package build-ignore receives a total of 1 weekly downloads. As such, build-ignore popularity was classified as not popular.
We found that build-ignore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.