Giter Club home page Giter Club logo

vite-for-wordpress's Introduction

Vite for WordPress development

Can Vite replace Gulp?

/less/frontend.less > /public_html/assets/less-frontend.css
/less/backend.less  > /public_html/assets/less-backend.css
/scss/frontend.scss > /public_html/assets/scss-frontend.css
/scss/backend.scss  > /public_html/assets/scss-backend.css
/js/frontend.js     > /public_html/assets/frontend.js
/js/backend.js      > /public_html/assets/backend.js

Feature testing

✔️ Run once
✔️ Run continously

❔ Run in development mode
❔ Run in production mode

✔️ Compile Less to CSS
✔️ Compile SCSS to CSS
✔️ Compile ES to JS
✔️ Autoprefix CSS
✔️ Minify CSS
✔️ Minify JS
❔ CSS sourcemaps
❔ JS sourcemaps
✔️ Multiple CSS tasks
✔️ Multiple JS tasks

✔️ Reload on CSS changes
✔️ Reload on JS changes
✔️ Reload on PHP changes

❔ Notification on CSS error
❔ Notification on JS error

✔️ Keep going on CSS error
✔️ Keep going on JS error

vite-for-wordpress's People

Contributors

brugman avatar

Stargazers

 avatar

Watchers

 avatar

vite-for-wordpress's Issues

Method D

Usage

pnpm run build

Problems

None yet.

Concessions

  • Output file name is always based on input file name.

Method A

Usage

pnpm run build

Problems

  1. The hash in the output files needs to be removed.

2022-10-17-03-26-22

  1. The output filenames need to be controlled.

frontend.less and frontend.scss are both being transformed into frontend.css and that causes a conflict.

Method C

Trying multiple input files.

Usage

pnpm run build

Problems

Now index.html is back to being a problem.

2022-10-17-04-02-40

Method B

Trying to set output file name.

Usage

pnpm run build

Problems

  1. Something is not working related to output.file and or output.dir.

2022-10-17-04-03-49

Method E

Build once

pnpm run build

Build continuously

pnpm run dev
pnpm run watch

Both commands have to be running, so you'll need 2 tabs/panes.

Problems

No validation of JS/CSS.
No sourcemaps.

Concessions

The input files must be unique. You can't have frontend.less and frontend.js.

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.