Skip to content

A reusable SCSS / JS builder for WordPress themes / plugins

License

Notifications You must be signed in to change notification settings

stevygee/master-builder

Repository files navigation

Master Builder

A reusable SCSS / JS builder, now based on esbuild!

Lego timelapse

Requirements

  • Node 12

Features

  • Super fast!
  • JSX
  • Sass / SCSS
  • PostCSS
  • Autoprefixer
  • Browserslist support
  • Copy additional files
  • Compress all files into a ZIP
  • etc.

Getting started

  1. Add scripts to your project's package.json:
  "scripts": {
    "start": "master-builder",
    "build": "master-builder build",
    "deploy": "master-builder deploy"
  },
  1. npm install @stevygee/master-builder --save-dev
  2. npm start

Optional: Copy .master-builder, .browserslistrc config files to your project and configure to your needs!

Building for production

  1. npm run build

Building for production and create a zip file

  1. npm run deploy
  2. Upload the zip file in dist/packages for use in WordPress (install theme/plugin).

Development

  1. Checkout this repo
  2. npm install
  3. Instead of npm start, use node bin/index.js or node bin/index.js deploy to build the example files

Development using your project

How to add as a local dependency:

  1. Checkout this repository in a sibling directory next to your project
  2. Change the dependency path in your project's package.json:
  "devDependencies": {
    ...
    "@stevygee/master-builder": "../master-builder"
  }
  1. Use npm install to continously update the package after you've made a change.

Lego Batman