-
Notifications
You must be signed in to change notification settings - Fork 28
Format HTML template files as a pre-commit hook #1225
Comments
Couple options here at least with # command so I don't forget :-)
yarn html-beautify -I -A force-aligned -s 2 ./src/app/integrations/list/list.component.html <div class="integrations list">
<syndesis-modal [title]="'Confirm ' + getActionTitle()"
[message]="'Are you sure you would like to ' + getAction() + ' the \'' + selectedIntegration?.name + '\' integration?'">
</syndesis-modal>
<!-- List Container -->
<pfng-list [items]="integrations"
[config]="listConfig"
[itemTemplate]="itemTemplate"
[actionTemplate]="actionTemplate"
(onActionSelect)="handleAction($event, undefined)"
(onClick)="handleClick($event)">
<ng-template #itemTemplate
let-integration="item"
let-index="index">
<div class="list-pf-left integration-icons">
<span *ngIf="getStart(integration).connection; let connection">
<img src="../../../assets/icons/{{ connection.connectorId }}.integration.png">
</span>
<span class="fa fa-angle-right"></span>
<span *ngIf="getFinish(integration).connection; let connection">
<img src="../../../assets/icons/{{ connection.connectorId }}.integration.png">
</span>
</div>
<div class="list-pf-content-wrapper">
<div class="list-pf-main-content integration-content">
<div *ngIf="complete"
class="list-pf-title name">{{ integration.name }}</div>
<div class="list-pf-description description">
{{ complete ? integration.description : integration.name }}
</div>
</div> And then yarn html-beautify -I -A force -s 2 ./src/app/integrations/list/list.component.html <div class="integrations list">
<syndesis-modal [title]="'Confirm ' + getActionTitle()"
[message]="'Are you sure you would like to ' + getAction() + ' the \'' + selectedIntegration?.name + '\' integration?'">
</syndesis-modal>
<!-- List Container -->
<pfng-list [items]="integrations"
[config]="listConfig"
[itemTemplate]="itemTemplate"
[actionTemplate]="actionTemplate"
(onActionSelect)="handleAction($event, undefined)"
(onClick)="handleClick($event)">
<ng-template #itemTemplate
let-integration="item"
let-index="index">
<div class="list-pf-left integration-icons">
<span *ngIf="getStart(integration).connection; let connection">
<img src="../../../assets/icons/{{ connection.connectorId }}.integration.png">
</span>
<span class="fa fa-angle-right"></span>
<span *ngIf="getFinish(integration).connection; let connection">
<img src="../../../assets/icons/{{ connection.connectorId }}.integration.png">
</span>
</div>
<div class="list-pf-content-wrapper">
<div class="list-pf-main-content integration-content">
<div *ngIf="complete"
class="list-pf-title name">{{ integration.name }}</div>
<div class="list-pf-description description">
{{ complete ? integration.description : integration.name }}
</div>
</div> I also thought diffable-html looked interesting as well in that the goal was to make it easier to see HTML diffs. @kahboom @deeleman @seanforyou23 thoughts? |
@gashcrumb thanks for creating this! I kinda like the way it looks pre- As for diffable-html, do you mean so that we can use inline templates instead of external HTML files, or could you provide a specific use case? Sorry, Monday brain on a Tuesday.. it happens. |
The goal here is to make it easier to see changes done to HTML files, i.e. when attributes are added/deleted or the text content of a tag changes etc. Mostly handy for the person reviewing a PR than anything I think. I think @deeleman's preference was for the |
@gashcrumb Ah that makes sense, then I don't see any major disadvantage to trying it out if nobody has objections. As for the |
Now that we have it for typescript, json, css and scss files, we should have the same for HTML files to help @kahboom maintain sanity.
The text was updated successfully, but these errors were encountered: