Site setup script example
This script is an example of how a custom site setup automation could look like to improve personal developer productivity.
This script was originally assembled by @johnbillion for a workshop at WordCamp Torino 2018.
This script is an example of how a custom site setup automation could look like to improve personal developer productivity.
This script was originally assembled by @johnbillion for a workshop at WordCamp Torino 2018.
var gulp = require('gulp'); | |
var rename = require('gulp-rename'); | |
var changed = require('gulp-changed'); | |
var request = require('sync-request'); | |
var through = require('through2'); | |
var gutil = require('gulp-util'); | |
var prettyHrtime = require('pretty-hrtime'); | |
var fs = require('fs'); | |
var config = require('../config'); |
<?php | |
/** | |
* AMP Disable ES Modules. | |
* | |
* @package AMP_Disable_ESM | |
* @author Alain Schlesser <alain.schlesser@gmail.com> | |
* @link https://gist.github.com/schlessera/4127ab30f4235f1acbc11e3eee77701a | |
* @license GPL-2.0-or-later | |
* | |
* @wordpress-plugin |
<?php | |
/** | |
* AMP Disable Optimizer | |
* | |
* @package AMP_Disable_Optimizer | |
* @author Alain Schlesser <alain.schlesser@gmail.com> | |
* @link https://gist.github.com/schlessera/3c279bac46b3437966e5812901e5f923 | |
* @license MIT | |
* | |
* @wordpress-plugin |
This simple Robo script let's you quickly pull up a new site via Valet+.
This was mention and demonstrated during Episode of my "Personal Home Page" livestream. More information about the livestream can be found at https://www.alainschlesser.com/streaming/.
<?php declare( strict_types=1 ); | |
final class RoboFile extends \Robo\Tasks { | |
public function createEmpty( string $name, string $tld = 'localhost', string $email = 'alain.schlesser@gmail.com' ) { | |
$io = $this->io(); | |
$root = __DIR__; | |
$io->title( 'Creating an empty local WordPress site' ); |
WP-CLI, the command-line interface for WordPress, is one of the most popular tools among WordPress developers. However, it can be extremely helpful for anyone managing a WordPress site. In this webinar, the main person behind WP-CLI project: Alain Schlesser will show us the ins and outs of the tool. He will give us great examples on how it can be used to improve your workflow, for beginners to experienced developers and for projects big and small. We will give you invaluable examples on how to perform different tasks with WP-CLI automatically, saving you time and preventing you from making manual errors, like:
I hereby claim:
To claim this, I am signing this object:
<?php | |
class Plugin | |
{ | |
protected $plugin_root; | |
private $loaded; | |
public function __construct(PluginRoot $plugin_root) | |
{ |
<?php namespace Generic; | |
use RuntimeException; | |
/** | |
* Class Autoloader. | |
* | |
* This is a custom autoloader to replace the functionality that we would | |
* normally get through the autoloader generated by Composer. | |
* |