node.js and webpack throws error when trying to setup node to watch theme folder for saved changes

It seems to be a syntax error. The options should be passed inside postcssOption according to the webpack documentation. Try replacing this line: use: [“css-loader?url=false”, { loader: “postcss-loader”, options: { plugins: postCSSPlugins } }] With this: use: [“css-loader?url=false”, { loader: “postcss-loader”, options: { postcssOptions : { plugins: postCSSPlugins} } }]

Error in node.js webpack-cli failed to load config, typeError: ManifestPlugin is not a constructor

The error you get is: [webpack-cli] TypeError: ManifestPlugin is not a constructor You are trying to load weback-manifest-plugin it like this: const ManifestPlugin = require(“webpack-manifest-plugin”) How it should be loaded Looking at the documentation for webpack-manifest-plugin, it should be loaded like this: const { WebpackManifestPlugin } = require(‘webpack-manifest-plugin’); So change that row, and then also … Read more

Setting Up PHP Workflow in WordPress

Having a local environment that is the same for all devs is pretty easy to setup using vccw.cc or basic-wordpress-vagrant. Use Git for plugins and themes — each as their own repo. Free private repos are available on Bitbucket. Pass your DB around using WP-CLI or wordmove to sync settings and content.

Fullscreen Video/GIF Intro

The following code uses HTML5 Video, with the muted & autoplay attributes set. It takes the video, which I uploaded through the media gallery and displays it fullscreen. I’m using a script that detects when the video is done playing, then it fades out and is removed from the DOM. HTML <div class=”fullscreen-bg”> <video muted … Read more

Version control when creating a page or post with

The easiest way to have custom HTML per post is probably by using post type templates. You can easily put those into version control. As for the CSS, you could create separate files per post as well. But this harder to maintain and leads to more stylesheets that need to be downloaded by the user … Read more