Getting started with eWizard CLI
Software requirements
To start working with eWizard CLI:
-
Install Node.js from the official site.
Note
To guarantee the stable work of eWizard CLI, we recommend using the LTS version.
-
Install Git.
Install eWizard CLI
To install the eWizard CLI npm package globally on your computer:
npm install -g ewizard-cli
For more information on how to develop e-Detailers, emails, sites with eWizard CLI, visit our Documentation site.
For more information about the eWizard CLI commands, see eWizard CLI commands documentation.
Otherwise, below is the Quick Start Guide for you.
Login
Once you've installed eWizard CLI, log in to your eWizard instance.
-
Use the Command prompt to log in.
wiz login
-
If it's your first login, enter your eWizard instance.
Note
You receive your eWizard instance link with your user name and password credentials. The eWizard instance follows this pattern: https://[company].ewizard.io
. For example, https://viseven.ewizard.io.
The authentication form opens in your browser.
-
Enter your login and password.
-
Select Sign in.
Congratulations! You are logged in.
Initialize project
To create the initial project structure and install all dependencies, run:
wiz init
After successful project creation, you can use other eWizard CLI commands.
Components
Use wiz install
to fetch and install components. Under the hood, it works with the npm packages.
To install a component, run:
wiz install
Make sure the package.json
file in your project has the component dependency. For example, to install the wiz-button
component, add this dependency:
"wiz-button": "git+https://git.qapint.com/ewizardjs/email/components/wiz-button.git"
Or you can run:
wiz install [COMPONENT_NAME]
This command installs the component to the ./node_modules
directory and writes the dependency to the package.json
file.
For example:
wiz install wiz-button
Development process
Run the following command to build a project:
wiz dev
Use wiz dev
with the --live
option to start a hot reload server. This command builds your project and runs it on the dev server. By default, the dev server is running on port 3000.
Go to http://localhost:3000
in your browser to see the project with live reloading. eWizard CLI tracks changes in the project files, rebuilds the project and reloads it in the browser.
Run tests locally
Before running tests, create the .env
file in the root of your project with eWizard credentials:
TEST_URL=https://instance.ewizard.io
TEST_USER=[USER_NAME]
TEST_PASSWORD=[PASSWORD]
Note
The instance is your company name. For example, https://viseven.ewizard.io.
[USER_NAME]
is your eWizard username or email address.
[PASSWORD]
is your eWizard password.