пакетный tslint на несколько строк

Я запускаю пакет, содержащий команду tslint

tslint -c ../tslint.json --project tsconfig.json --out output.txt --format msbuild -e '**/bin/Debug/**' -e '**/fonts/**' -e '**/images/**' -e '**/Scripts/**' -e '**/typings/**' -e 'file1.ts' -e 'file2.ts' -e 'file3.ts' -e 'file3.ts' -e 'file4.ts'  
…

к сожалению, я хочу исключить много файлов, и их нелегко читать, поэтому я хотел бы прочитать тот же файл, но с возможностью перейти к строке и написать что-то в этой форме:

    tslint -c ../tslint.json --project tsconfig.json --out output.txt --format msbuild 
-e '**/bin/Debug/**' 
-e '**/fonts/**' 
-e '**/images/**' 
-e '**/Scripts/**' 
-e '**/typings/**' 
-e 'file1.ts' 
-e 'file2.ts' 
-e 'file3.ts' 
-e 'file3.ts' 
-e 'file4.ts' 

Вы знаете, как это сделать, пожалуйста?


person Lemec Cinq    schedule 29.04.2019    source источник
comment
Вы можете использовать знак вставки, чтобы избежать возврата строки, например 1. tslint -c ../tslint.json --project tsconfig.json --out output.txt --format msbuild ^, 2. -e '**/bin/Debug/**' ^ 3. -e '**/fonts/**' ^ и т. д.   -  person Compo    schedule 29.04.2019
comment
@Compo да, ты прав   -  person Lemec Cinq    schedule 30.04.2019


Ответы (1)


Вот мой комментарий в качестве ответа.

Вы можете попробовать избежать возврата строки с помощью знаков вставки ^, включая пробел перед каждым:

tslint --config ../tslint.json --project tsconfig.json --out output.txt --format msbuild ^
--exclude '**/bin/Debug/**' ^
--exclude '**/fonts/**' ^
--exclude '**/images/**' ^
--exclude '**/Scripts/**' ^
--exclude '**/typings/**' ^
--exclude 'file1.ts' ^ 
--exclude 'file2.ts' ^
--exclude 'file3.ts' ^
--exclude 'file4.ts'

Можно также начинать отдельные строки с пробела и заканчивать каждую следующую строку знаком вставки ^:

tslint -c ../tslint.json -p tsconfig.json -o output.txt -f msbuild^
 -e '**/bin/Debug/**'^
 -e '**/fonts/**'^
 -e '**/images/**'^
 -e '**/Scripts/**'^
 -e '**/typings/**'^
 -e 'file1.ts'^
 -e 'file2.ts'^
 -e 'file3.ts'^
 -e 'file3.ts'^
 -e 'file4.ts'

Поскольку маловероятно, что несколько пробелов будут проблематичными для tslint, вы даже можете попробовать это:

tslint -c ../tslint.json^
       -p tsconfig.json^
       -o output.txt^
       -f msbuild^
       -e '**/bin/Debug/**'^
       -e '**/fonts/**'^
       -e '**/images/**'^
       -e '**/Scripts/**'^
       -e '**/typings/**'^
       -e 'file1.ts'^
       -e 'file2.ts'^
       -e 'file3.ts'^
       -e 'file4.ts'
person Compo    schedule 30.04.2019