Zapnito::Cli
Install
$ gem install zapnito-cli
Configure
Add the following configuration to ~/.zapnito
{
"environments": {
"development": {
"basepath": "http://zapnito.localhost",
"token": "your dev API token"
},
"stage": {
"basepath": "https://staging-zapnito.com",
"token": "your stage API token"
},
"production": {
"basepath": "https://zapnito.com",
"token": "your production API token"
}
},
"debug": false
}
Your api_token is generated automatically and is available on your account (user.api_token
).
The environments are all optional, commands will be shown for a particular environment if the configuration is provided.
Usage
Create a theme for a tenant
This will create a new directory for the tenant with the basic folder structure for a theme.
$ zapnito theme add
Publish a theme
To upload the theme to s3.
$ zapnito theme production:publish
Preview in browser
This will open a preview in the browser. Note, you need to publish a theme before previewing.
$ zapnito theme production:preview
Generate a preview link to share
$ zapnito theme production:preview_link
Development
Options
The following may be adding to your ~/.zapnito
config. developmentThemeDir
is required if you want to run the executable.
{
"environments": ...
"proxy": "http://localhost:8888",
"debug": true,
"developmentThemeDir: "path/to/local/theme/used/when/developing"
}
Running the cli
To run the cli during development use
bundle exec ./exe/zapnito
Gem tasks
See rake -T
for a list of tasks