1.0.8 ā¢ Published 5 years ago
csproj-sanitizer v1.0.8
csproj-sanitizer
This mini package helps sanitize your csproj file from duplicates and missing includes.
Installation
$ npm i -g csproj-sanitizer
Usage
$ csproj-sanitizer _ _ _ _
___ ___ _ __ _ __ ___ (_) ___ __ _ _ __ (_) | |_ (_) ____ ___ _ __
/ __| / __| | '_ \ | '__| / _ \ | | _____ / __| / _` | | '_ \ | | | __| | | |_ / / _ \ | '__|
| (__ \__ \ | |_) | | | | (_) | | | |_____| \__ \ | (_| | | | | | | | | |_ | | / / | __/ | |
\___| |___/ | .__/ |_| \___/ _/ | |___/ \__,_| |_| |_| |_| \__| |_| /___| \___| |_|
|_| |__/
Usage: csproj-sanitizer --filePath [path]
Options:
--filePath Relative or Absolute path where the csproj file is located [required]
--findPattern [default: "**/*.{cs,cshtml}"]
--findIgnores [default: "!{node_modules,bin,obj}/**"]
--rootDir [default: <current directory>]
Example
$ csproj-sanitizer --filePath src/test/examples/missing.csproj
ā No duplicated includes found.
X 1 missing includes found.
- Missing file in csproj: "src\test\examples\test.cshtml"
Git pre-commit hook
Create a file called .git/hooks/pre-commit
#!/bin/sh
exec csproj-sanitizer --filePath example.csproj --rootDir webDir
Author
Giacomo Spettoli