1.0.8 ā€¢ Published 5 years ago

csproj-sanitizer v1.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

csproj-sanitizer

Build status Test Coverage Code Climate dependencies Status GitHub license

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

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago