VTEX Toolbelt
CLI tool for developing VTEX apps.
Install
First, install node and npm (Linux, Mac and Windows).
Then install VTEX Toolbelt globally:
npm install -g vtex
Livereload
Add to your layout the script:
<script src="http://localhost:35729/livereload.js?snipver=1"></script>
Developing an app
To develop an app locally, open the directory where your VTEX app is then type:
vtex watch <sandbox-name>
You are free to set any name you want in the sandbox-name
parameter.
VTEX Toolbelt will upload all your app files to the sandbox specified and will be watching for any changes you make to them.
Requirements
For this to work make sure this requirements are filled:
- Your app must have a proper
meta.json
(read more) - Your app need to be installed on your store OR set on your store dependencies on the
meta.json
file - You must properly set
vtex_sandbox
cookie (read more)
Publishing an app
To publish your VTEX app to VTEX Gallery, just type vtex publish
. The app will be published under the vendor name.