csproj-sanitizer

1.0.8 • Public • Published

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

/csproj-sanitizer/

    Package Sidebar

    Install

    npm i csproj-sanitizer

    Weekly Downloads

    9

    Version

    1.0.8

    License

    MIT

    Unpacked Size

    50.2 kB

    Total Files

    41

    Last publish

    Collaborators

    • giacomos