Master Builder
A reusable SCSS / JS builder
heavily based on redaxo-mit-bimmelbam and just-build-it.
Requirements
- Node 12
Features
- Understands JSX / React for WordPress blocks
- PostCSS
- Autoprefixer
- CSS nano
- Browserify
- etc.
Getting started
- Add scripts to your project's package.json:
"scripts": {
"start": "master-builder",
"build": "master-builder build",
"deploy": "master-builder deploy"
},
npm install @stevygee/master-builder --save-dev
npm start
Optional: Copy .master-builder
, .browserslistrc
, cssnano.config.js
config files to your project and configure to your needs!
Building for production
npm run build
Building for production and create a zip file
npm run deploy
- Upload the zip file in dist/packages using WordPress (install theme/plugin).
Development
- Checkout this repo
-
npm install
(make sure you are using npm v7) - Instead of
npm start
, usenode bin/index.js
ornode bin/index.js deploy
to build the example files
Development using your project
How to add as a local dependency:
- Checkout this repo
- Change the dependency path in your project's package.json:
"devDependencies": {
...
"@stevygee/master-builder": "../master-builder"
}
- In your project root:
npm install @babel/core @babel/preset-env @babel/preset-react babel-preset-minify babelify tinyify
Use npm install
to continously update the package after you've made a change.