Search
 
SCRIPT & CODE EXAMPLE
 

C

tailwind install

Step 1:

npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9

Step 2:

npm install @craco/craco

Step 3:

package.json: 
{
    // ...
    "scripts": {

     "start": "craco start",

     "build": "craco build",

     "test": "craco test",

     "eject": "react-scripts eject"
    },
}

Step 4:

create craco.config.js at root

craco.config.js: 
module.exports = {
  style: {
    postcss: {
      plugins: [
        require('tailwindcss'),
        require('autoprefixer'),
      ],
    },
  },
}

Step 5:

npx tailwindcss-cli@latest init

Step 6:

// tailwind.config.js at root
  module.exports = {

   purge: [],

   purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
    darkMode: false, // or 'media' or 'class'
    theme: {
      extend: {},
    },
    variants: {
      extend: {},
    },
    plugins: [],
  }

Step 7:

/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
Comment

tailwindcss install

npm install tailwindcss --save-dev
Comment

tailwind installation

npx create-react-app app_name

npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9

npm install @craco/craco

Rimpiazza nel package.json:
  "start": "craco start",
  "build": "craco build",
  "test": "craco test",

Crea il file di configurazione:
// craco.config.js
module.exports = {
  style: {
    postcss: {
      plugins: [
        require('tailwindcss'),
        require('autoprefixer'),
      ],
    },
  },
}

Crea il file tailwind.config.js
	npx tailwindcss-cli@latest init
    
Ottimizzazioni:
// tailwind.config.js
mode: "jit",
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],

Includere tailwind:
  /* ./src/index.css */
  @tailwind base;
  @tailwind components;
  @tailwind utilities;
Comment

tailwind install

# using npm
npm i -D tailwind-styled-components

# using yarn
yarn add -D tailwind-styled-components
Comment

PREVIOUS NEXT
Code Example
C :: how to take comma separated integer input in c 
C :: turn a char array into double C 
C :: class in oops 
C :: c print 
C :: C strlen implementation 
C :: apt-mark remove hold 
C :: eliminare file in c 
C :: c language 
C :: powershell list big files 
C :: how to free memory in c 
C :: Happy birthday in C 
C :: check if string contains a character in c 
C :: Relational Operator in C language 
C :: c comment 
C :: find sum of all odd numbers from 1 to n using for loop 
C :: C program to calculate the sum of odd and even numbers 
C :: C Syntax of struct 
C :: c code recursive function to print numbers between two numbers 
C :: can we use logical operators in switch c 
C :: arduino vscode upload choosing sketch 
C :: c program for fibonacci series 
C :: C - Type Casting 
C :: #define _TIMESPEC_DEFINED struct timespec { time_t tv_sec; long tv_nsec; }; 
C :: jock cranley 
C :: Program to Find Swap Numbers Using Temporary Variable 
C :: elastic search url date 
C :: what the value in array not initialized yet c 
C :: ::template 
C :: string compare in c 
C :: online c compiler 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =