Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial project setup with modules #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
53 changes: 53 additions & 0 deletions .firebase/hosting.ZGlzdFxzaG9wcGluZy1jYXJ0LWFzc2lnbm1lbnQ.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
favicon.ico,1622260854418,2c19690e9587bae12f419b34d2edeecc76808099540a9c9f4ea6194116cfc8f7
assets/server/addToCart/addtocart.json,1622258529546,e93abffa4943f086f21f7b63fe5ff77c0c5278c429c12d680f1a31cdad24f745
assets/server/banners/banners.json,1623128886728,2e8431766378d4fcf7f37cb0edb145814fcf57b43b015bf40941597afe370b57
assets/server/categories/categories.json,1622731426777,24bd9afda160b8d9b8b107686006c84199da5eb8984013baf30abd352994425e
assets/server/products/products.json,1622455868876,6d1cb8d5894c2e1662cb5f394c329a9f62b26099bab52598cc74841c8ccad8ed
assets/static/images/cart.svg,1622270153019,3a8eefe9428167527bc1e0e39605055c386fdd29c1de65fba73e562d8495b80d
assets/static/images/logo.png,1622258529560,82e7d3e51f387e0f19af1570fcaf787947f7c1e9df15b30b5f88ccbbe96fd9b6
assets/static/images/logo_2x.png,1622258529561,8c0ecf28f5b8007ad768e0ccbedf30539f4cb72abf2b5caf3f9c2534e5a802ba
assets/static/images/lowest-price.png,1622258529562,8b2adef3dd9153cc27665fb5be1eb1855c4e13a9f119a16d8b161062a22ddee4
assets/static/images/category/baby.png,1622258529552,ba982f843fc9df2c83976e07c13b87fd8322f947a5d7b59e45beddec619e2ee8
assets/static/images/category/bakery.png,1622258529553,f18c8364aa30eac41a6d6c70f50f39501fd71c22457353a849baee9abf560974
assets/static/images/category/beauty.png,1622258529554,71fd999d0f6ec34570c29ae1f680e08bbcc23a5102eaa60d5941692dff627a8f
assets/static/images/category/beverages.png,1622258529557,65ddfc4236b78276e3a4a894702c02f0cd368e91e120f03028cc578b69de46ba
assets/static/images/category/fruits.png,1622258529559,329dd1fb0b5513341aa9a67b97032359d1a73365d9f459b770f3682ac78d5cc7
assets/static/images/offers/offer1.jpg,1622258529564,496420678342ab29e9ee193c4f2f4de7842078a36a5e33bb2e7158aeedea2a3f
assets/static/images/offers/offer2.jpg,1622258529566,a4ee2a460c1ea6aee04059d14ba71532973340b6c948d4692ef8dc0e46dd6261
assets/static/images/offers/offer3.jpg,1622258529567,e36eee3e6e79dc017f4c80b407e3e08f1ce99f3e65284ce3b1c2c03ee744a169
assets/static/images/offers/offer4.jpg,1622258529569,54bdfdfc94a231855a76e904abf71e40bbb5d5545584ebd6e0755c9fce38fe96
assets/static/images/offers/offer5.jpg,1622258529570,9091b600a040419aa2a9e5b2b13e0395f174a5e73d0bd59854e35aca2e9f3ba1
assets/static/images/products/baby/baby-dove.jpg,1622258529572,d03af3c01dd02cc91d3abc5191ab31f01555423368244a667505fb9d509f3271
assets/static/images/products/baby/cerelac.jpg,1622258529572,4206f09b4c7d99dff2d55b3ea07565823088a64985a1d6647321947d4f8ce3aa
assets/static/images/products/baby/mamy.jpg,1622258529573,9d590b06cce6a2b9375c9221e4aee1452b743deaee9ab77043f57e9e97341197
assets/static/images/products/baby/pampers.jpg,1622258529574,0aecec7738c2c34eecd2e45e4fed336b88f3b8c9bb5d37c7a04861ea81bc36b5
assets/static/images/products/baby/red-wipes.jpg,1622258529575,4422c5e3ed70ef0335625d18ccaa3fa8d05b8fa30e64a6030b32958593d2dd32
assets/static/images/products/baby/shampoo.jpg,1622258529576,5579ac6cbea80dab5c68bff5bf2a0719f33ff87c78cf3e13e95a70a35cac52d7
assets/static/images/products/baby/wipes.jpg,1622258529577,f13a641c2ad7a1bcd6212e29a82bd4e89aad65563a361f9e7a4075fff44c1fe2
assets/static/images/products/bakery-cakes-dairy/bread.jpg,1622258529578,1e47859154ebb7c909a10ee1aaa2426df61d44dadb2156eb862dbdc39253d35e
assets/static/images/products/bakery-cakes-dairy/paneer.jpg,1622258529579,0c2aa3831f69bf112d95a123beff91475697cf71e05096b21cee530516ed34e6
assets/static/images/products/bakery-cakes-dairy/yogurt-blue.jpg,1622258529579,8d85f9cfef9a86bc671b23d33231ccabafbe5cceaadd6a5dcf9953577f5b4ea7
assets/static/images/products/bakery-cakes-dairy/yogurt-red.jpg,1622258529580,57c203b20ce8ce711a7ee487963fe90b6efb0f4559c53220842cddcfd10a88da
assets/static/images/products/beauty-hygiene/closeup.jpg,1622258529581,61ddd54d04eba6d6cfc9e4b28dcd142f8a2771ce9d102db8ddafd53c20962abf
assets/static/images/products/beauty-hygiene/dove.jpg,1622258529582,d8ad3dadf9454e99b9320013da1dc665f86697a54173f5ed9b0e693fecb0b78e
assets/static/images/products/beauty-hygiene/listerine.jpg,1622258529583,1a97411e2a2a680da3e4173d8ea1195478754d5b23be4bb322d8fcc45b2d36b6
assets/static/images/products/beauty-hygiene/shampoo.jpg,1622258529584,190aca4c021f9baa1f60be9bc5441f8b6a7fd39ca3f0d4701271117cec64d4c4
assets/static/images/products/beauty-hygiene/tissues.jpg,1622258529585,bdd3bb80e6f0755a011adc52ccef3fc8902815f6e582d4b9c3dfd5360ac78e96
assets/static/images/products/beverages/bournvita.jpg,1622258529586,7bb0e17e50cd4146868fa75ffe779e830891011e6a039ba57a40ba43cc961618
assets/static/images/products/beverages/coke.jpg,1622258529587,952355eff47648fdf952bf17d41c5862c4c2782679d1124ca6860c3e3086c859
assets/static/images/products/beverages/red-label.jpg,1622258529588,f46e974a870739434591d370a0ddebebdee2510c05bd385287f98ff33551a7b5
assets/static/images/products/beverages/tata-tea.jpg,1622258529589,6096411fd53343ea83f7532411d61b3f3b262f20a5e13e311198d18221fdcd8d
assets/static/images/products/fruit-n-veg/apple.jpg,1622258529590,f0a31503e1c41eeef9730e51422ac9e013295966b922a49cdda2a3059dd810a2
assets/static/images/products/fruit-n-veg/capsicum-green.jpg,1622258529591,3cd670786b3e84a12517a30f05da52c29947503a10070909417309e1bd13a214
assets/static/images/products/fruit-n-veg/kiwi-green.jpg,1622258529591,56d77f6af71f129b024d1068cf6fbfaefedc7197533f94ca6f7d49e4d2a931ec
assets/static/images/products/fruit-n-veg/pomegrante.jpg,1622258529592,c927c15f3c825fff630719c95bbb6b0eab0f32f08a33b4d3354bf27348783aed
assets/static/images/products/fruit-n-veg/tomato.jpg,1622258529593,028eee5d521382ddc413ff7bda11e47356441f1e1753e7c4686ff6a6e145ed9c
308.36c547db32874dc1b007.js,1623391558964,c629e87055b17b19fd6a760b1d882d05b86d9f3bbcf6c6172810ff593a5b43d8
197.4182be5d96f6cd349fd8.js,1623391558964,bd2592380c6d2728693dbe2ca864c4795db8a6fed92b2eb880405069701179e6
index.html,1623391559508,e1dfdec15fafe46d7024c94630918fa91caeff62d86e009ec3759ea7d82f5357
3rdpartylicenses.txt,1623391558964,537e6692f19f8340e125600c6bfed5107ffddb9394f24170a6f67e847d51f2e7
runtime.d57c77c39430ce13568c.js,1623391558964,8bbf780919ce630921bafe3b2fc791b0169773f3d87f1e59b60cc6861d3cd091
0.9a38248964150528d2b3.js,1623391558964,79c9deb193d3ea4af8534a300bbe1e28eceefb88dafaab93c2ff00305e6af82a
polyfills.b9567f6575f4c69f1eba.js,1623391558964,9c5ccb3dcfa02614f99de13b0030f26423cda640d6d849156849bfaf58ea2043
styles.69ffccf911e1683fd87b.css,1623391558964,71e37279a26d104c8977e3ff694bb49a5aa51d878aeb727a4007becf37a20ffa
main.eda509ca310fb3858aef.js,1623391558964,b0074fe1fca043881b1a0f595f1480f7892a214d504ec2d5260f9bbe2573a039
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "shopping-cart-assignment-ed878"
}
}
106 changes: 45 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,61 +1,45 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# XT Shopping Cart Assignment
# ShoppingCartAssignment

This is the base folder for the shopping cart exercise. You will have all the static assets and mock server responses available in this repo.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.2.

## Getting Started
## Development server

Clone this repo and run following command for starting the mock server:
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

```
npm install
npm run start
# or
yarn install
yarn start
```
## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
111 changes: 111 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"shopping-cart-assignment": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/shopping-cart-assignment",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "shopping-cart-assignment:build:production"
},
"development": {
"browserTarget": "shopping-cart-assignment:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "shopping-cart-assignment:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles/styles.scss"
],
"scripts": []
}
}
}
}
},
"defaultProject": "shopping-cart-assignment"
}
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist/shopping-cart-assignment",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Loading