The Computer E-Commerce Application is a user-friendly and feature-rich online platform designed to cater to computer enthusiasts, gamers, and professionals looking to purchase high-quality computer hardware. With an intuitive user interface and a vast range of products, our application aims to provide a seamless shopping experience for customers seeking the latest and most reliable computer components.
- Webpack: A powerful bundler used to package and optimize the application's assets.
- TypeScript: A statically-typed superset of JavaScript that enhances code reliability and maintainability.
- HTML Webpack Plugin: Simplifies HTML file creation and injection of bundled scripts into the HTML template.
- Sass: A popular CSS preprocessor that provides advanced features and improves CSS code organization.
- PostCSS: A versatile CSS tool that enhances and transforms styles using plugins.
- Stylelint: A linter for style sheets that helps maintain consistent and error-free CSS code.
- Prettier: An opinionated code formatter that ensures consistent code style across the project.
- ESLint: A JavaScript linter that identifies and enforces coding patterns and best practices.
- Jest: A testing framework for JavaScript and TypeScript applications.
- Husky: A Git hook manager used to trigger scripts on pre-commit and pre-push actions.
- lint-staged: A tool that runs linters on staged files to enforce code quality before committing.
- Terser: A JavaScript minifier that compresses and optimizes the final build output.
- Autoprefixer: Automatically adds browser-specific prefixes to CSS properties to enhance compatibility.
- Mini CSS Extract Plugin: Extracts CSS into separate files for better performance.
- Webpack Dev Server: A development server that enables live reloading and better development experience.
- ts-jest: A TypeScript preprocessor for Jest to enable testing TypeScript files.
- @typescript-eslint: Integrates ESLint with TypeScript for enhanced linting capabilities.
- @testing-library/dom: Simple and complete DOM testing utilities that encourage good testing practices.
- Boxicons: Carefully designed open source iconset with 1500+ icons. It's crafted to look enrich your website/app experience.
- JustValidate: Modern, simple, lightweight (~5kb gzip) form validation library written in Typescript, with no dependencies.
- Toastify-JS: Toastify is a lightweight, vanilla JS toast notification library.
- Swiper: Swiper - is the free and most modern mobile touch slider with hardware accelerated transitions and amazing native behavior.
Before you begin, ensure that you have the following software installed on your machine:
- Node.js (v14.x or higher)
- npm (Node Package Manager) or yarn
- Open your terminal or command prompt.
- Change the current working directory to the location where you want to clone the project.
- Run the following command to clone the repository:
git clone https://github.com/your-username/shop-n-comp.git
Replace your-username with your actual GitHub username. - Change into the project directory:
cd shop-n-comp
- After navigating to the project directory, install the required dependencies using npm or yarn:
Using npm:npm install
Using yarn:yarn install
- To build the project, run the following command:
Using npm:npm run build
Using yarn:yarn build
- To start the development server and view the application in your browser, use the following command:
Using npm:npm start
Using yarn:yarn start
This will start the development server, and the application will be accessible athttp://localhost:8080
.
- To run tests, use the following command:
Using npm:npm run jest-test
Using yarn:yarn jest-test
Now you have successfully set up and run the Computer E-Commerce Application project locally on your machine. You are welcome to explore and contribute the project!
start
: Starts the development server using webpack and serves the application in development mode.
build
: Bundles the application using webpack in production mode for deployment.
lint
: Runs ESLint to check for linting errors in the project's files.
format
: Formats the project's TypeScript files using Prettier to ensure consistent code style.
clear-dist
: Removes the dist directory and its content.
jest-test
: Runs Jest to execute unit tests defined in the project.
jest-generate-report
: Runs Jest with coverage enabled to generate a test coverage report in the Coverage folder.
prepare
: Installs Git hooks using Husky to facilitate pre-commit and pre-push actions.