Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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
Shell :: git rebase branch 
Shell :: vmware shared folder not showing 
Shell :: bash read value 
Shell :: git cherry pick many commits 
Shell :: nvm fish shell 
Shell :: what is uname -r linux 
Shell :: npm install on Termux 
Shell :: ssh mac 
Shell :: how to delete branch on git 
Shell :: microphone auto adjusting ubuntu 
Shell :: what is a shebang line 
Shell :: show hidden files mac 
Shell :: xampp install in linux fedora 
Shell :: dockerfile copy folder to container 
Shell :: how to move folders in linux terminal 
Shell :: docker cmd multiple commands 
Shell :: what is user in linux? 
Shell :: command to open snap gui 
Shell :: pm2 how to make app start on boot 
Shell :: allure report history 
Shell :: create a tunnel via permanently 
Shell :: kazam or simplescreenrecord Recording the Black Screen in linux. 
Shell :: list relative path windows 
Shell :: adding master changes to a branch 
Shell :: install styletron 
Shell :: create eth1 interface in ubuntu without any physical interface 
Shell :: how to install from a Linux terminal 
Shell :: get number input batch 
Shell :: awk delimiter semi-colon 
Shell :: Push existing folder 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =