Categories
Front End Development How to Javascript

How to immediately call a function in JavaScript (IIFE)

Sometimes you might want to run a function without ever having to call it. This is especially useful when you want to declare some global variables, but also keep them private, within a function. This article explains how you can immediately call a function in javascript. What is an IIFE? An Immediately Invoked Function Expression […]

Categories
Developer Tools How to Workflow

How to Allow HTML formatting in JSX with VS Code

One of the annoying quirks of writing HTML inside of a javascript file is that, by default, it doesn’t recognise that you’re actually writing HTML. In VS Code, this can be fixed by opening your settings.json and adding this option: Oh happy days!

Categories
Blog Front End Development WordPress

Quick SASS Setup for WordPress Themes

This is my go-to for quickly adding sass functionality to any WordPress theme. Just add the following package.json to your theme folder (assuming you already know how to run npm/node, and have them installed and ready to go): You can grab the package.json code here. I always hate copying and pasting from things like the […]