Skip to content

Commit

Permalink
Corrected prettier config and some minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen committed Dec 9, 2022
1 parent 7c726a9 commit fe1ea5a
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 68 deletions.
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.angular/
.github/
.vscode/
node_modules/
dist/
build/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ A deployed version of this app can be found at
To configure and run this sample app, you will need the following prerequisites
installed on your workstation:

* [Node.js and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
* [Angular CLI](https://angular.io/guide/setup-local)
- [Node.js and NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [Angular CLI](https://angular.io/guide/setup-local)

## Setup

Expand Down
29 changes: 6 additions & 23 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,10 @@
"outputPath": "dist/angular-store",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "src/styles.scss"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -84,19 +76,10 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "src/styles.scss"],
"scripts": []
}
}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "angular-store",
"version": "0.0.0",
"scripts": {
"pretty": "prettier . --write --loglevel warn",
"pretty:check": "prettier . --check",
"ng": "ng",
"start": "ng serve",
"build": "ng build",
Expand Down
1 change: 0 additions & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

</style>

<app-header [categories]="categories"></app-header>
Expand Down
18 changes: 14 additions & 4 deletions src/app/cart/cart.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ <h2>Your Cart</h2>
<div class="second-row">
<mat-form-field class="input app-no-padding" appearance="fill">
<mat-label>Quantity</mat-label>
<input type="number" matInput name="quantity" [value]="item.quantity"
(change)="onQuantityChange($event, item)" />
<input
type="number"
matInput
name="quantity"
[value]="item.quantity"
(change)="onQuantityChange($event, item)"
/>
</mat-form-field>
<mat-form-field class="input app-input-no-underline" appearance="fill">
<mat-label>Size</mat-label>
Expand All @@ -54,7 +59,12 @@ <h2>Your Cart</h2>
</div>

<div class="buttons">
<google-pay-button environment="TEST" buttonType="buy" buttonSizeMode="fill" [paymentRequest]="paymentRequest"
(loadpaymentdata)="onLoadPaymentData($event)"></google-pay-button>
<google-pay-button
environment="TEST"
buttonType="buy"
buttonSizeMode="fill"
[paymentRequest]="paymentRequest"
(loadpaymentdata)="onLoadPaymentData($event)"
></google-pay-button>
<button mat-stroked-button (click)="onCheckout()">Checkout</button>
</div>
2 changes: 1 addition & 1 deletion src/app/category/category.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

:host {
:host {
display: block;
text-align: center;
}
Expand Down
9 changes: 7 additions & 2 deletions src/app/item-details/item-details.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ <h3>Description</h3>
<div [innerHtml]="itemDescription"></div>
</div>
<div class="buttons">
<google-pay-button environment="TEST" buttonType="buy" buttonSizeMode="fill" [paymentRequest]="paymentRequest"
(loadpaymentdata)="onLoadPaymentData($event)"></google-pay-button>
<google-pay-button
environment="TEST"
buttonType="buy"
buttonSizeMode="fill"
[paymentRequest]="paymentRequest"
(loadpaymentdata)="onLoadPaymentData($event)"
></google-pay-button>
<button mat-stroked-button (click)="onAddToCart()">Add to Cart</button>
</div>
</div>
Expand Down
34 changes: 16 additions & 18 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,20 @@
<!DOCTYPE html>

<html lang="en">

<head>
<meta charset="utf-8">
<title>AngularStore</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography">
<app-root></app-root>
</body>

<head>
<meta charset="utf-8" />
<title>AngularStore</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
</head>
<body class="mat-typography">
<app-root></app-root>
</body>
</html>
8 changes: 2 additions & 6 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts"
],
"include": [
"src/**/*.d.ts"
]
"files": ["src/main.ts"],
"include": ["src/**/*.d.ts"]
}
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
]
"lib": ["ES2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
9 changes: 2 additions & 7 deletions tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
"types": ["jasmine"]
},
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}

0 comments on commit fe1ea5a

Please sign in to comment.