indisc / wave-webpack-build

Build Oxid eShop Wave theme using webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wave-webpack-build

Build Oxid eShop Wave theme using webpack

Installation

You will need composer and nodejs (npm) installed to use this

git clone https://github.com/aggrosoft/wave-webpack-build.git

npm install

composer install

npm run wave:init

Usage

Copy .env.dist to .env and change parameters accordingly.

Clone assets/child/example/ and adjust to your template name.

Modify everything in assets/child/[yourtheme] folder to your needs, then run the following command to build the assets in public folder

npm run build:prod

For CSS purging to work correctly assets/child/[yourtheme]/tpl should contain a copy of your template files.

Deployment

Contents of public folder need to be deployed to your source folder.

Alternatively you can set AUTO_DEPLOY in .env and enter Ftp credentials to deploy to. Run

npm run deploy or npm run build-deploy

to build and/or deploy in single command

Dependencies

You need to have wave-webpack-build module installed and enabled to use the themes correctly.

But why?

Wave theme is compiled using Grunt currently, it lacks effective tree shaking and css purging. This leads to badly optimized assets and slower loading times. Using this webpack build will remove unneeded javascript and css from the template.

About

Build Oxid eShop Wave theme using webpack

License:MIT License


Languages

Language:JavaScript 74.2%Language:SCSS 20.3%Language:PHP 5.5%