Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created February 17, 2018 20:31
Show Gist options
  • Save Shelob9/8a89edecf4d180ea28fc4c2518601c56 to your computer and use it in GitHub Desktop.
Save Shelob9/8a89edecf4d180ea28fc4c2518601c56 to your computer and use it in GitHub Desktop.
Install create-guten-block and use it to create a plugin with a block (and optionally eject from cgb-scripts)
# Install create-guten-block globally
npm install create-guten-block --global
# Create a plugin "fancy-video-player" with a block
create-guten-block fancy-video-player
# switch from plugins to new plugin directory
cd fancy-video-player
# Install
npm install
# Run development build and watchet
npm run start
# Build plugin assets the most optimized for performance
npm run build
# Convert single dependency cgb-scripts to all dependies it encapsualtes.
npm run eject
@ahmadawais
Copy link

Josh you don't have to run npm install that's done for you.

Just one single command.

npx create-guten-block fancy-video-player

and then

cd fancy-video-player
npm start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment