This repo is part of Git Integration & Wix CLI, a set of tools that allows you to write, test, and publish code for your Wix site locally on your computer.
Connect your site to GitHub, develop in your favorite IDE, test your code in real time, and publish your site from the command line.
This repo is connected to a Wix site. That site tracks this repo's default branch. Any code committed and pushed to that branch from your local IDE appears on the site.
Before getting started, make sure you have the following things installed:
- Git
- Node, version 14.8 or later.
- npm or yarn
- An SSH key added to your GitHub account.
To set up your local environment and start coding locally, do the following:
- Open your terminal and navigate to where you want to store the repo.
- Clone the repo by running
git clone <your-repository-url>
. - Navigate to the repo's directory by running
cd <directory-name>
. - Install the repo's dependencies by running
npm install
oryarn install
. - Install the Wix CLI by running
npm install -g @wix/cli
oryarn global add @wix/cli
.
Once you've installed the CLI globally, you can use it with any Wix site's repo.
For more information, see Setting up Git Integration & Wix CLI.
Once your repo is set up, you can write code in it as you would in any other non-Wix project. The repo's file structure matches the public, backend, and page code sections in Editor X.
Learn more about this repo's file structure.
The Local Editor allows you test changes made to your site in real time. The code in your local IDE is synced with the Local Editor, so you can test your changes before committing them to your repo. You can also change the site design in the Local Editor and sync it with your IDE.
Start the Local Editor by navigating to this repo's directory in your terminal and running wix dev
.
For more information, see Working with the Local Editor.
The Wix CLI is a tool that allows you to work with your site locally from your computer's terminal. You can use it to build a preview version of your site and publish it. You can also use the CLI to install approved npm packages to your site.
Learn more about working with the Wix CLI.
Git Integration & Wix CLI extends Editor X's concurrent editing capabilities. Invite other developers as collaborators on your site and your GitHub repo. Multiple developers can work on a site's code at once.
- Sync with web dev:
wix dev
- Generate a preview:
wix preview
- Publish:
wix publish