dream-cli

0.2.1 • Public • Published

VTEX Dream CLI

Makes you a happy store developer :)

Installation

Make sure you have Node.js installed. Then:

$ npm i -g dream-cli

Commands

$ dream -h
Options:
  -h, --help     Show this help.
  -l, --login    Authenticate with VTEX ID.
  -d, --deploy   Deploy <your store> <version> on dream-engine. This will make your version go live!

Development setup

First, download an example store like DreamStore.

$ wget -qO- -O dreamstore-master.zip https://github.com/vtex/dreamstore/archive/master.zip && unzip dreamstore-master.zip && rm dreamstore-master.zip

Then, authenticate this machine with VTEX ID

$ dream login

Great, now we can start hacking at our new store. Inside the store directory, call dream:

$ cd dreamstore-master
$ dream

(...)

DE >> App started on port 1337 with environment development

Go to localhost:1337 and you will be able to navigate your local store.
Note that any changes to files under templates/ or public/ will issue a Livereload. Nice!

Deploying your store

To deploy your store, you must first publish it on npm. (Roadmap: private registries!)

To start, alter the version on your package.json to reflect your changes.
Note: you can use a tool like Releasy to automate this kind of procedure!

$ releasy
Old version: 0.3.0
New version: 0.3.1-beta
prompt: Are you sure?:  (yes)
Starting release...
Version bumped to 0.3.1-beta
File package.json added > git add package.json
File package.json committed > git commit package.json -m "Release v0.3.1-beta"
Tag created: v0.3.1-beta > git tag v0.3.1-beta -m "Release v0.3.1-beta"
Pushed commit and tags > git push --follow-tags
All steps finished successfuly.

Then, simply use publish via npm:

$ npm publish

Now, your store is available to dream-engine.
Use the deploy command to publish it live:

$ dream deploy
Deploying store
name: dreamstore
version: 0.3.1-beta
Deployed successfuly

If your version is a beta, it will be available at:

yourstore.dreambeta.vtex.io

Otherwise, it will be published to:

yourstore.dream.vtex.io

Hooray! Your store is live. Good sales! :)

Advanced deployment

You can also specify which environment you wish to deploy this version to:

$ dream deploy stable
Checking files...
Deploying store
name: dreamstore
version: 0.3.1-beta
environment: stable
Deployed successfuly

Now, version 0.3.1-beta is available at yourstore.dream.vtex.io

Readme

Keywords

none

Package Sidebar

Install

npm i dream-cli

Weekly Downloads

5

Version

0.2.1

License

none

Last publish

Collaborators

  • gadr90
  • firstdoit