Skip to content

Harsh-00/Hacker_News

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Create React App

This project was bootstrapped with Create React App.

    npx create-react-app my-project
    cd my-project

Set Up Tailwind Css in React App

1.In the project directory, Install Tailwind CSS

    npm install -D tailwindcss
    npx tailwindcss init

2.Configure 'tailwind.config.js' File

    /** @type {import('tailwindcss').Config} */
    module.exports = {
     content: [
        "./src/**/*.{js,jsx,ts,tsx}",
     ],
     theme: {
      extend: {},
     },
     plugins: [],
    }

3.Add Tailwind to /src/index.css

    @tailwind base;
    @tailwind components;
    @tailwind utilities;

Cloning and Running the Application in local

Clone the project into local

Install all the npm packages. Go into the project folder and type the following command to install all npm packages

npm install

In order to run the application Type the following command

npm start

The Application Runs on localhost:3000

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open https://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

** Setting Up Tailwind in React Project

1.Go Inside Your React folder

```sh
cd react-tailwind-css-starter-pack
npm install
```

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify