Webhook uses Grunt for its local runserver and task runner. The Webhook command line tools are sometimes simple aliases to specific Grunt commands.
If you haven't already, install the Webhook command line tools in your terminal.
npm install -g wh
Webhook Command Line
The Webhook CLI has the following commands:
wh create sitename # Create a new Webhook directory/site at "sitename". wh recreate sitename # Recreate an existing Webhook site. This downloads the files last deployed to the live website. We recommend using version control. wh delete sitename # Permanently deletes a webhook site. Can not be undone. wh serve # Serves a Webhook site locally. Watch for changes. wh deploy # Packages local, deploys to the live server, and runs a new build. wh update # Updates the site directory you're in to use the latest Webhook runserver code libraries. wh preset-build # Generates a .preset-data.json file at root that can be used to rebuild your CMS form structure. wh preset-build-all # Generates a .preset-data.json file at root that can be used to rebuild your CMS form structure as well as the content within it. # wh init creates the secret key file for a local site that doesn't have one (say a github clone). # Must be run in an existing webhook directory. wh init sitename # where sitename is your site's name.
Grunt commands in the local server
The following grunt commands are supported.
grunt clean # Deletes the files in the .build/ directory. grunt scaffolding:typename # Generates scaffolding HTML for a passed content-type from the CMS. grunt build # Runs clean, and then rebuilds the .build/ directory.