GithubHelp home page GithubHelp logo

svandu / ecommerce-node-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 16.84 MB

Home Page: https://ecommerce-node-app.netlify.app/

JavaScript 70.83% HTML 1.31% SCSS 27.48% CSS 0.38%
firebase-auth reactjs react-router

ecommerce-node-app's Introduction

Table of content

  1. Day 1
  2. Day 2

Day 1

  • Create a new repository in github.
  • Open command line in folder where you want to create project.
  • Write command
    npm create vite@latest
  • Aswering the all the questions:
    √ Project name: ... ecommerce-node-app
    √ Select a framework: » React
    √ Select a variant: » JavaScript
  • Change your directory and install all the packages.
    cd ecommerce-node-app
    npm install
  • Start the server
    npm run dev
  • Remove all the unnecessary files and codes from index.css, App.jsx, App.css
  • Remove image from assets react.svg

Day 2

  • Create component for navigation bar
  • Install sass library in the terminal
    npm install sass
  • Create index.jsx and navbar.scss in NavigationBar component
  • Write code of jsx for navigation bar in index.jsx and sass code in navbar.scss
  • Set the path of NavigationBar component in App.jsx
  • Create file for svg icon in src --> assets --> SearchIcon.svg, CartIcon.svg, UserIcon.svg
  • Install svg into react component
    npm i vite-plugin-svgr
  • Add the plugin inside the vite.config.js
    import { defineConfig } from 'vite'
    import react from '@vitejs/plugin-react'
    import svgr from "vite-plugin-svgr";

    // https://vitejs.dev/config/
    export default defineConfig({
    plugins: [svgr(), react()],
    })
  • Import the SVG file in react components
    import { ReactComponent as SearchIcon } from "../../assets/SearchIcon.svg";
    import { ReactComponent as CartIcon } from "../../assets/CartIcon.svg";
    import { ReactComponent as UserIcon } from "../../assets/UserIcon.svg";
  • Call the component in the jsx as <SearchIcon />, <CartIcon />, <UserICon />

ecommerce-node-app's People

Contributors

svandu avatar

Watchers

 avatar

Forkers

subrat611

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.