bower-ignore v0.3.2
Bower Ignore
A simple CLI tool to gitignore useless files of bower dependencies

Installation
npm install bower-ignore -gGlossary
- ignores: JSON object named "dependencies-gitignore" (by default) in
bower.json, which looks like:
"dependencies-gitignore": {
"bootstrap": {
"ignore": ["*", "dist/css/*.map"],
"unignore": ["dist/*"]
}
}package: Generally the name of a repository appeared in
bower.json, which has been installed with bower.formulae: Collection of polular packages ignores, hosted on GitHub: github.com/mdluo/bower-ignore-formulae
📢 Contribution wanted! Go >>
- gitignore: Plain text in
.gitignore, generated based on ignores. For each package in ignores, thebdgi gitcommand takes elements fromignoreArray andunignoreArray by turns and prefixbower_componentspath and package name to them. And then write the multiline text to.gitignore.
# Generated by bower-ignore, please DO NOT modify
# = Bower Ignore Begin
bower_components/bootstrap/*
!bower_components/bootstrap/dist/*
bower_components/bootstrap/dist/css/*.map
# = Bower Ignore EndUsage
Example
Add and set "dependencies-gitignore" (i.e. ignores, hereinbelow) based on "dependencies" in bower.json:
bdgi jsonAdd or replace (if ignores already exists) ignores based on "dependencies" packages in bower.json:
bdgi json -fDownload and replace ignores based on "dependencies" packages in bower.json:
bdgi json -dfDownload jquery and moment formulae and set. Skip if packages already exist in ignores:
bdgi json jquery moment -dSometimes you may need to edit the ignores part of your
bower.jsonto meet your dependencies tree.
Setup ignores in bower.json and add ignores and unignores to .gitignore:
bdgi json -d && bdgi gitCommand Line Usage
Usage: bdgi <cmd> [options] [packages...]
Commands:
json|j [options] [packages...] add and set "dependencies-gitignore" in bower.json
git|g [options] add ignores and unignores to .gitignore based on ignores in bower.json
Options:
-h, --help output usage information
-V, --version output the version numberFuture features
Resolve packages dependencies tree and add ignores automaticly.
Watch file change and take reactions.
Add version support to packages.
Contributing
Feel free to submit pull requests, open issues if you have any question to ask or bug to report. Or, just help to improve this README.md file and messages in bin/bdgi.