WordPress & TypeScript. Simple starter template for WordPress projects

Overview

wp-typescript-starter

The power of WordPress and TypeScript combined.

This is a simple starter template for WordPress development projects that want to use TypeScript in combination with @wordpress/scripts. It makes using TypeScript in WordPress a breeze.

Usage

For installation, use the following commands in your command-line.

// Clone the repository
git clone [email protected]:makeitworkpress/wp-typescript-starter.git

// Get to cloned directory
cd wp-typescript-starter

// Install devDependecies
npm install

// Run compilation scripts in dev / watch mode
npm run start 

// Run compilation scripts for production
npm run build

This file uses /assets/src/scripts.ts as the entry file. This file is compiled to /assets/public/scripts.js when running the build or start npm scripts. Start writing your code in /assets/src/scripts.ts, or modify the webpack.config.js to your own liking.

Under the hood, this starter boilerplate uses @wordpress-scripts to compile scripts, but extends its configuration in webpack.config.js to support Typescript and custom entry and output directories.

Please note that the Block Editor of WordPress still has poor support for custom types, but this probably will improve.

You might also like...
Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library.

Simple WordPress plugin to learn how to understand WordPress Crons and the Action Scheduler library. Import Jamendo playlists with tracks in WordPress posts.

:rocket: Next Generation Template / Theme Framework

Gantry Framework Ready to get started with Gantry 5? That's great! We are here to help. On this page, you will get some quick tips to help you hit the

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

WP Bootstrap Navwalker This code in the main repo branch is undergoing a big shakeup to bring it in line with recent standards and to merge and test t

A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities.

Awesome WordPress A curated list of Awesome WordPress Theme, Plugins and Framework development Resources and WordPress Communities. Inspired by bayand

The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone.

Pronamic WordPress Basecone The Pronamic WordPress Basecone plugin allows you to connect your WordPress installation to Basecone. Table of contents Au

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.

Twenty Twenty-Two Welcome to the development repository for the default theme that will launch with WordPress 5.9. About Twenty Twenty-Two is designed

Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer.

Description Easy handle APlayer on WordPress. A shortcode for WordPress to using APlayer. Support [audio] tag, compatible with AMP. Requirement WordPr

WordPress plugin that lets you use Discourse as the community engine for a WordPress blog

WP Discourse Note: the wp-discourse plugin requires = PHP-5.4.0. The WP Discourse plugin acts as an interface between your WordPress site and your Di

A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API

Wordpress XML-RPC PHP Client A PHP client for Wordpress websites that closely implement the XML-RPC WordPress API Created by Hieu Le MIT licensed. Cur

Owner
Make it WorkPress
Let's make it work using WordPress!
Make it WorkPress
Simple WordPress plugin starter framework.

WordPress Plugin Starter This is the official WordPress plugin starter framework for Highfivery. The purpose behind it is to improve the quality of th

Highfivery LLC 5 Oct 27, 2022
Automattic 10.7k Jan 2, 2023
Style guide for writing consistent PHP for WordPress projects.

Inpsyde PHP Coding Standards PHP 7+ coding standards for Inpsyde WordPress projects. Installation The code styles are enforced via the popular php_cod

Inpsyde GmbH 77 Nov 14, 2022
Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace

Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace, in order to prevent conflicts with other plugins loading the same dependencies in different versions.

Coen Jacobs 362 Dec 23, 2022
Create WordPress themes with beautiful OOP code and the Twig Template Engine

By Jared Novack (@jarednova), Lukas G├Ąchter (@lgaechter), Pascal Knecht (@pascalknecht), Maciej Palmowski (@palmiak_fp), Coby Tamayo (@cobytamayo), Up

Timber 5.2k Jan 5, 2023
Classy is a framework for building WordPress themes, based on Blade template engine

Classy is a framework for building WordPress themes, based on Blade template engine. It's fast with beautiful architecture that allows you to write le

DigitalKwarts 75 Nov 23, 2022
Brings Laravel's great template engine, Blade, to WordPress

###This plugin is deprecated in favor of ekandreas/bladerunner WordPress Blade Brings Laravel's great template engine, Blade, to WordPress. Just insta

Mikael Mattsson 150 Nov 29, 2022
Manuel Monteiro WP Starter Theme

_s Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turnin

Manuel 1 Oct 25, 2021
Add theming support to your Laravel 5.* projects

Laravel Theme Add theming support to your Laravel 5.* projects. Features Custom theme locations Support for theme inheritence with theme fallback Them

Karlo Mikus 70 Feb 5, 2022
A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings.

Suspend WP A WordPress plugin to suspend WordPress sites automagically. Simple and lightweight, no annoying ads and fancy settings. ?? Demo (coming so

Waren Gonzaga 3 Nov 15, 2021