Giter Club home page Giter Club logo

2222press's Introduction

2222press

Free tool to install and use tailwindcss with your WordPress theme And Also Your Child Theme in same time easily and also minify your classes as css code from Your Command line

and You don't need to import the tailwind.config.js file in your <script src> html page Because it is all merged automatically with the css file

works smart You can change the file and folder names and they will be found

I know the guide looks big, but it's very, very easy

See tutorial Video :

Step Image

Getting Started

1- You must have npm packge

2- You must have bash script


Setup

  1. cd project_directory/wp-content/themes/YourTheme/YourAssets/
  2. git clone https://github.com/borma425/2222press.git
  3. cd 2222press/render
  4. bash render.sh -install

Now to prepare the Tailwind css file You have two choices :

A- without Optimizing for Production

build your CSS With full prepare without minify

  1. bash render.sh -full

Rebuilding... your CSS With Watch bash render.sh -watch

B- With Optimizing for Production

build your CSS With prepare css minify your classes

  1. bash render.sh -minify

general information

Files with the default name :

  • tailwind.min.css
  • input.css
  • tailwind.config.js
  • functions.php

are downloaded and used You can change them externally

But you must make sure to modify them in the variables in the render.sh file between line 2:8


How it works ?

  • tailwindcss node_modules downloads normally as the official tailwind does
  • Create a tailwind.config.js file
  • import tailwind.min.css file as hook in functions.php in end of lines of file

Codes are copied from the tool's core files

  • simple-functions.php
  • simple.config.js

So if you want when installing something to be copied, you can modify the file and it will be transferred as it is


How to Uninstall

Just

  • remove a hook from functions.php
  • delete 2222press folder

How to upload a template without packages

We know that the node_modules folder is large in size

so , just delete :

  • node_modules folder
  • package.json
  • package-lock.json

also you can delete optional:

  • tailwind.config.js

but You don't need to delete the tailwind.config.js file, it will be recognized automatically next time when you install

It will not be created again, do not worry

This is how you can upload the template in a smaller size and reuse it again locally without tailwind.config.js file customizations

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.