Tabris.js 2.0 – Top 10 Features for Mobile Apps Development: Tabris CLI
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).
Getting started
To install the Tabris.js CLI, run:
1 |
npm install -g tabris-cli |
Note: you need to have the Node environment installed.
Create a Tabris.js app in no time
Run:
1 |
tabris init |
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:
1 |
tabris serve |
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 cordova
and having to learn how to work with its parameters. Execute:
1 |
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 tabris build
.
Running an app on an emulator or a device
Apps can be deployed to a connected device by running:
1 |
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 --device
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 run
command.
Tabris.js CLI for all Tabris.js builds
It doesn’t matter if you build locally or using the build service at https://tabris.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:
1 |
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.
- TypeScript & JSX
- Windows 10 Support
- File system access
- AlertDialog
- Binary fetch()
- Simplified event and properties API
- StatusBar and NavigationBar
- Tabris CLI
- Security
- NavigationView
Feedback is welcome!
Want to join the discussion?Feel free to contribute!