Building and Running

Once you’ve got your project checked out and building locally, there are some more advanced options and techniques you can use for running and debugging your project.

Test

The test command is probably all you need when developing your project.

eko studio test

When executed from the project directory it will take care of the following:

  • It builds the project and puts its artifacts into the dist folder
  • It starts a local server that serves said dist folder
  • It opens our development endpoint http://dev.eko.studio/test?devhost=0.0.0.0%3A8000 on our delivery server, which allows you to test your project in the eko environment it will live inside once it’s published

It is highly recommended to test your project on mobile devices. This way you can take into account smaller screen sizes with different proportions, performance limitations and mobile web APIs, as well as experience the project in the same way many of the users will. To make it simpler to view your project on a device, use the --mobile flag, to display a QR code which you can scan to get the URL to your locally served project.
Your development machine and mobile device must be connected to the same LAN.

eko studio test --mobile

Build

The build command can be executed explicitly to build your project without serving it. This can be used in scripts.

eko studio build

In development mode the build process will not uglify your code. When published, however, your code is uglified and optimized for delivery. In cases you want to debug the production code just add the --uglify flag to the test or build commands. For example:

eko studio build --uglify

Optional Arguments

You can add some useful flags to the test and build commands such as --qs to configure the query string params, --chromeflags to tune chrome’s command line arguments and more.

See the available flags by adding --help:

eko studio test --help
Rate this page: X
Tell us more!