update cmd line

This commit is contained in:
asep komarudin 2023-03-03 07:09:50 +07:00
parent 67a507d530
commit 8c55f6b749
214 changed files with 48553 additions and 48489 deletions

View file

@ -0,0 +1,34 @@
export class BladeFormatter
{
newLine: string = "\n";
indentPattern: string;
constructor(options?: IBladeFormatterOptions) {
options = options || {};
// options default value
options.tabSize = options.tabSize || 4;
if (typeof options.insertSpaces === "undefined") {
options.insertSpaces = true;
}
this.indentPattern = (options.insertSpaces) ? " ".repeat(options.tabSize) : "\t";
}
format(inuptText: string): string {
let inComment: boolean = false;
let output: string = inuptText;
// fix #57 url extra space after formatting
output = output.replace(/url\(\"(\s*)/g, "url\(\"");
return output.trim();
}
}
export interface IBladeFormatterOptions
{
insertSpaces?: boolean;
tabSize?: number;
}