Christian is a working student at EclipseSource. He has worked on several Tabris.js apps, and has contributed to the Tabris.js …
Tabris.js 2.0 - Top 10 Features: Tabris CLIJune 28, 2017 | 3 min Read
The Tabris.js team is putting the final touches on Tabris.js 2.0 and we are getting really excited about this release. Over the next 3 weeks, we will be highlighting 10 features of Tabris.js 2.0 that we are really excited about. Tabris.js 2.0 will include new APIs, new platforms, and lots of new features. It also comes with some new tooling to help you.
The Tabris.js CLI is a small tool to help you with common Tabris.js development tasks. It provides a convenient interface replacing the multiple tools which had to be used before (generator-tabris-js and yeoman for project creation, http-server for serving apps and cordova to build, sign and deploy apps).
To install the Tabris.js CLI, run:
npm install -g tabris-cli
Note: you need to have the Node environment installed.
Create a Tabris.js app in no time
After answering a few questions, a simple Tabris.js project will be created in your current directory.
Serve the Tabris.js app
To see your new app running on a mobile device, follow these simple steps:
On your development machine execute:
This starts an HTTP server serving code and other resource of your app to connected devices. The address of the server will be output to the console:
Then start the Tabris.js developer app on your mobile device and connect it to this URL to see your app in action.
Note: you may need to transpile your code before serving it if using TypeScript or ES6.
Local builds just got a whole lot easier
No more fiddling with
and having to learn how to work with its parameters. Execute:
tabris build android
Cordova is now a local dependency of Tabris.js CLI, so you won’t need to take care of installing the right Cordova CLI version to make the build work.
_See the Tabris.js CLI documentation for more information about
Running an app on an emulator or a device
Apps can be deployed to a connected device by running:
tabris run android
In case no device is connected, the app will be deployed to an emulator.
_Note: for iOS builds, signing credentials and the
flag have to be given to deploy the app to a connected device. See the Tabris.js CLI documentation for more information about code signing and the
Tabris.js CLI for all Tabris.js builds
It doesn’t matter if you build locally or using the build service at https://tabrisjs.com. Tabris.js CLI is used for all Tabris.js builds starting from 2.0.0. This makes tracking down issues locally much easier.
Excited? So we are
Tabris.js 2.0 will be released on July 18th. Make sure to check it out! In case you want to try out Tabris.js CLI now, you can install the latest version compatible with Tabris.js 2.0.0-rc2:
npm install -g tabris-cli
Follow us on Twitter as we count down to this release.
Tabris.js 2.0 - Top 10 Features
The Tabris CLI is just one of the cool new additions to Tabris.js 2. Don’t forget to check out the other top 10 features in the rundown below.