Skip to content

Instantly share code, notes, and snippets.

@thetwopct
Last active June 9, 2022 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thetwopct/c2326c775c696c81140a19555ca2bc1a to your computer and use it in GitHub Desktop.
Save thetwopct/c2326c775c696c81140a19555ca2bc1a to your computer and use it in GitHub Desktop.
Lando example file for WordPress running node and npm inside Lando
name: basetheme
recipe: wordpress
config:
webroot: .
keys:
- id_rsa
proxy:
node:
- bs.basetheme.lndo.site:3000
excludes:
- vendor
- node_modules
services:
node:
type: 'node:14'
ssl: true
scanner: false
tooling:
npm:
service: node
node:
service: node
phpcs:
service: appserver
description: Run PHPCS commands
cmd: /app/vendor/bin/phpcs
phpcbf:
service: appserver
description: Run PHPCBF commands
cmd: /app/vendor/bin/phpcbf
paths:
service: appserver
cmd: '/app/vendor/bin/phpcs --config-set installed_paths /app/vendor/wp-coding-standards/wpcs && /app/vendor/bin/phpcs -i'
description: 'Set code sniff paths - needed before phpcs and phpcnf commands'
sniff:
service: appserver
cmd: /app/vendor/bin/phpcs --config-set installed_paths /app/vendor/wp-coding-standards/wpcs && /app/vendor/bin/phpcs -n -s --ignore="*/build/*,*/dist/*,*/acf-json/*,*/node_modules/*,*gulpfile*,*/uploads/*,*/plugins/*,*/scripts/*,*/vendor/*,*pantheon*,/build/*,/source/js/third-party/*" -d memory_limit=1024M --standard="WordPress" /app/wp-content/themes/
fix:
service: appserver
cmd: /app/vendor/bin/phpcs --config-set installed_paths /app/vendor/wp-coding-standards/wpcs && /app/vendor/bin/phpcbf -n -s --ignore="*/build/*,*/dist/*,*/acf-json/*,*/node_modules/*,*gulpfile*,*/uploads/*,*/plugins/*,*/scripts/*,*/vendor/*,*pantheon*,/build/*,/source/js/third-party/*" -d memory_limit=1024M --standard="WordPress" /app/wp-content/themes/
debug:
service: appserver
cmd: 'touch /app/wp-content/debug.log && tail -f /app/wp-content/debug.log'
description: 'Get real-time WP debug log output'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment