“installer le vent arrière” Réponses codées

NPM CSS à vent arrière

# Using npm
npm install tailwindcss

# Using Yarn
yarn add tailwindcss
Combative Capuchin

installer le vent arrière

# If you're on Next.js v10
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
# Or
yarn add -D tailwindcss@latest postcss@latest autoprefixer@latest
# If you're on Next.js v9 or older
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat @tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
Adorable Albatross

Installation de vent arrière

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;
Motionless Mosquito

installer le vent arrière

#if you need package.json file, run init command
npm init -y
#install tailwind
npm i tailwindcss
#if building forms also install
npm install @tailwindcss/forms
# in your src folder add "style.css" with lines below, to import tailwind styles:
@tailwind base;
@tailwind components;
@tailwind utilities;
#create a script in package.json
"scripts" : {
	"build:css": "tailwind build src/style.css -o dist/style.css",
    "watch:css": "npx tailwindcss -i ./src/style.css -o ./dist/style.css --watch"
}
#run the build
npm run build:css
#run watch when working
npm run watch:css

Matija Štrlekar

Installez CSS à vent arrière

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init
darkrabel

Installation de vent arrière

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;
Federiko98

Réponses similaires à “installer le vent arrière”

Questions similaires à “installer le vent arrière”

Plus de réponses similaires à “installer le vent arrière” dans Shell/Bash

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code