Using wh recreate
At any time you can use the
wh recreate sitename command to rebuild your live website locally on your computer. Note that this is not version controlled. It's just a direct download of your site templates and static files from the last time you deployed your website.
Using version control
Webhook works great with any version control software and can be safely used amongst a team of developers or on multiple computers. If you plan to store your Webhook site on a remote repository like Github you'll want to be aware of the following best practices.
Example: Set up a Webhook site using Github so you can work across multiple computers .
Here is the general flow for setting up a Webhook site for version control so you can work on across multiple computers or as the member of a team.
wh create sitenameto create your site.
- Edit your templates and static files.
- Create a new public or private repository on Github, follow the instructions there to
git initwithin your
sitenamefolder and push the code to Github, continuing to push changes as you make them.
- On a new computer,
git clonethe github repository you set up.
- Once it's finished downloading, run
wh init yoursitenameinside your new
sitenamedirectory. This will download and install the necessary files to get your cloned site running locally.
- Push changes to Github from either computer to keep in sync.
We automatically .gitignore some stuff
By default, Webhook automatically adds the following to your site's
.gitignore file. Of note is the
.firebase.conffile which contains the secret key to accessing your site's database. You should never give this key out. Other directories like
node_modules are there so that multiple devs aren't crossing streams as they make commits.
lib-cov *.seed *.log *.csv *.dat *.out *.pid *.gz .DS_Store pids logs results npm-debug.log node_modules /.build /.firebase.conf