csproj-integrity
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
const checksolution = require('../index'); | ||
@@ -7,3 +9,3 @@ const program = require('commander'); | ||
.parse(process.argv); | ||
let files = program.args; | ||
let files = program.args; | ||
@@ -10,0 +12,0 @@ if (!files.length) { |
@@ -47,4 +47,4 @@ 'use strict'; | ||
fileIncluded = itemgroups | ||
//Take only item groups <Compile> and <Content> | ||
.filter( (item) => item.Compile || item.Content || false ) | ||
//Take only item groups <Compile>, <Content> and <TypeScriptCompile> | ||
.filter( (item) => item.Compile || item.Content || item.TypeScriptCompile || false ) | ||
//Take only the object of itemgroup | ||
@@ -61,2 +61,5 @@ .map( (item) => { | ||
} | ||
if (item.TypeScriptCompile) { | ||
a = a.concat(item.TypeScriptCompile); | ||
} | ||
@@ -63,0 +66,0 @@ return a; |
{ | ||
"name": "csproj-integrity", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Check csproj file (Visual Studio) integrity", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,60 +6,59 @@ # csproj-integrity | ||
## Install | ||
## CLI commands | ||
Install **csproj** command globally with | ||
```bash | ||
npm install -g csproj-integrity | ||
``` | ||
$ npm install --save-dev csproj-integrity | ||
To check integrity of .csproj file move to the root of the file and run | ||
```bash | ||
$ csproj integrity | ||
``` | ||
To check local files are include in your csproj file run | ||
```bash | ||
$ csproj files Views/**/*.js Controllers/**/*.cs | ||
``` | ||
The module has 2 tasks: | ||
### checkFiles | ||
### **checkFiles** | ||
This task takes an array of path and check if all files are included in the .csproj file. | ||
![alt tag](http://mantovanig.it/media/csproj.gif) | ||
![alt tag](docs/gif/csprojFiles.gif) | ||
Usage example | ||
```js | ||
const csproj = require('csproj-integrity'); | ||
csproj.checkFiles(['Views/**/*.cshtml', 'Controllers/**/*.cs']); | ||
``` | ||
### checkIntegrity | ||
### **checkIntegrity** | ||
This task check if all file included in the csproj file actually exist. | ||
![alt tag](http://mantovanig.it/media/csproj_task2.gif) | ||
![alt tag](docs/gif/csprojIntegrity.gif) | ||
Usage example | ||
```js | ||
const csproj = require('csproj-integrity'); | ||
csproj.checkIntegrity(); | ||
## As Library | ||
``` | ||
$ npm install --save-dev csproj-integrity | ||
``` | ||
## CLI commands | ||
Install **csproj** command globally with | ||
Usage example | ||
```js | ||
const csproj = require('csproj-integrity'); | ||
```bash | ||
npm install -g csproj-integrity | ||
``` | ||
To check integrity of .csproj file move to the root of the file and run | ||
csproj.checkIntegrity(); | ||
```bash | ||
$ csproj integrity | ||
csproj.checkFiles(['Views/**/*.cshtml', 'Controllers/**/*.cs']); | ||
``` | ||
To check local files are include in your csproj file run | ||
```bash | ||
$ csproj files Views/**/*.js Controllers/**/*.cs | ||
``` | ||
## TO DO | ||
- Unit test with TAPE | ||
- Check of duplicated | ||
- Gulp plugin | ||
- Update readme with examp report | ||
- CLI: Option to specify csproj file path |
328314
15
173
64