Skip to content
πŸ’„ A playground for the Prettier PHP plugin
Vue JavaScript
Branch: master
Clone or download

Prettier PHP Playground

This is a temporary playground for Prettier's experimental PHP Plugin, written in Vue.js with Nuxt.

Try it out online!


The main purposes of this playground are:

  1. making quick transformations on PHP code more comfortable, obviously
  2. serving as a transitioning tool for simplified testing and bug reporting until the PHP plugin is stable enough to be integrated into the official Prettier Playground.


The PHP playground comes with the interface you know and love β€” it's almost a 1:1 clone of Prettier's own playground, but with some improvements:

  • Offline First

    Thanks to Service Workers, the playground just worksβ„’ when you're not connected to the internet.

  • Mobile Support

    Working with code is not all too common on mobile devices, but if you need it, we're here for you β€” the PHP playground features a functional mobile layout.


To get the playground running on your machine:

  1. Clone this repository

    git clone
  2. Install dependencies

    yarn install

Then, if you want to work on the project locally with as much comfort as possible (hot reloading et al.), run:

yarn run dev

If you want to create a static site from your current work (in the projects dist folder) and then make that available to the browser, do:

yarn run generate
npx serve dist

Last but not least, if you want to create a static site how it's deployed to GitHub Pages (which is just the standard static site build process, but expects to not be in the website root but in a folder called /prettier-php-playground), run the following

yarn run generate:gh-pages

You don't need to run that last command manually though β€” as soon as new commits are merged into the master branch, Travis CI will do the work of pushing it to GitHub Pages.

You can’t perform that action at this time.