Giter Site home page Giter Site logo

block-playground's Introduction

Block Development Playground

This project gives you an Altis-powered environment to use for block editor experiments. All script loading should be handled by the plugins, so you're free to focus on block development!

Custom blocks should be created within the custom-blocks mu-plugin.

Installation

git clone [email protected]:humanmade/block-playground.git
cd block-playground
composer install
npm install
composer chassis init

You will now be able to load the site at altis.local, and sign in with the username admin and password password.

Local Development

Frontend development commands

  • npm start: Run the hot-reloading development server.
  • npm run build: Generate production-ready frontend asset bundles.
  • npm run phpcs: Run the PHP CodeSniffer linting tool against your project code.

Virtual Machine commands

npm run vagrant

Run any vagrant command against the virtual machine (providing that the local Chassis development environment has been initialized). You may use this script to easily run most vagrant commands, wherever you are in the project. For example:

  • npm run vagrant up: Start the virtual machine.
  • npm run vagrant halt: Stop the virtual machine.
  • npm run vagrant ssh: SSH into the virtual machine.

Note: Because of how npm run scripts work, you wish to pass arguments to a vagrant command (for example vagrant ssh -c "wp plugin list") then you will need to put an additional -- double-dash between the npm script command and the command's arguments. Examples:

  • npm run vagrant ssh -- -c "wp plugin list"
    • List out installed plugins. Any WP-CLI command should work if invoked in this manner.
  • npm run vagrant ssh -- -c "mysqldump -uwordpress -pvagrantpassword wordpress > /chassis/database-backup.sql"
    • Dump the wordpress database within the VM to a file database-backup.sql in your project root.
  • npm run vagrant destroy -- -f
    • Destroy the virtual machine.

block-playground's People

Contributors

kadamwhite avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.