VTEX Store development tools - reverse proxy, compilation, minification, optimization and more!
Watch a presentation about VTEX Speed here (pt-BR): http://firstdoit.github.io/presentations/vtex-day-2014
- Node - http://nodejs.org/
Clone this repo or download and unzip it.
Before continuing, please add a accountName
key to the package.json
file. For example:
{
"name": "vtex-speed",
"accountName": "myStore",
}
Enter the folder you cloned or downloaded, install dependencies and run npm start
:
cd speed
npm install
npm start
Advanced: You can easily change the proxy port by setting the PORT environment variable, e.g. PORT=9000 npm start
First, open your browser here to authenticate:
http://your-store-account-name.vtexlocal.com.br/admin/Site/Login.aspx
Then, open a normal page, like your home:
http://your-store-account-name.vtexlocal.com.br/?debugcss=true&debugjs=true
Important You should replace your-store-account-name
with the accountName of your store. Who would guess, huh?
Now, copy a CSS file from that site over to your src/
folder.
We already have src/arquivos/style.css
there as an example.
Go ahead and add a new rule to that file:
body {
background: black;
}
Nice! Live Reload has reloaded that stylesheet for you.
All files in src/
are compiled, optimized and copied to build/
when you run grunt
.
You can further configure this process editing Gruntfile.coffee
.
Currently supported:
- LiveReload of assets in HTTP and HTTPS
- Coffee compilation
- LESS compilation
- JS and CSS Minification
But, hey, there's more!
There are a ton of available Grunt plugins for your every need.
Go to http://gruntjs.com/plugins for a complete list.
If you think there's a plugin that's great for everybody, why don't you fork this repo and open a pull request?
We always want to hear you! Please report any problems to the issues page:
https://github.com/vtex/speed/issues
The HTTP response socket hung up before sending a complete reply.
You probably manually stopped a request on your browser.
Thus, the proxy shouted: "I was receiving a response and it stopped abruptly!"
-
2016-05-06 v3.0.0 Update grunt to major 1 and other dependencies
-
2015-03-16 v2.1.0 Update connect-http-please, separate middlewares from Gruntfile
-
2015-03-16 v2.0.0 Replace
connect-tryfiles
withserve-static
andproxy-middleware
, adding support to "vteximg" host proxying. Update deps. Important:accountName
is now a required property in thepackage.json
file.
MIT © VTEX