Skip to main content

Developing Applet with CLI

Once you generated your first Applet, it's time to start coding your solution. Applet boilerplate support hot-reload and emulation of JS APIs in built-in Emulator.

Key commands

npm run build # or your build command

For support of the older devices it's mandatory the javascript bundle is ES5-compatible. The build will run a webpack plugin, transpile and polyfil your code to ES5-compatible code.

npm run start

Starts your application in emulator and enables the hot-reload. Hot reloading works out-of-the-box only for projects generated by the CLI.

sos applet start 

To see your app running in the built-in Emulator with functional JS APIs run sos applet start. Your project is running on http://your.pc.ip.address:8090. You can stop the applet by ctrl + c / control + c.

Updating version of the JS API
npm i @signageos/front-applet@version --save

signageOS periodically updates and improves the JS APIs. Adding more features and improvements. To update the version of the JS APIs you are using, you need to update the front-applet library. Front-applet is the library wrapping the JS API and creating the bridge to native applications.

Uploading Applet to signageOS

Once your local development is completed, upload your Applet to signageOS. Uploaded Applet can be deployed to devices directly or you can generate your native deployment app.

sos applet upload

You will be asked for Organization, under which you want to upload your Applet and final confirmation.

Deployment guides

FAQ

Will local development be possible? I do not like the web IDE. Yes, you will be able to use VSCode or Webstorm for local development thanks to signageOS CLI.

Is the Emulator working offline? Yes, Emulator supports offline mode and comes with built-in features for debugging and quick Applet development.

What is the difference between npm start and sos applet start?

The npm start will run our prepared compilation pipeline and emulator with hot reloaded enabled. This works only for projects generated by our CLI Tool.

The sos applet start will only run the emulator without hot reload and compilation. It just runs your application. It works with projects generated by our CLI Tools. But its main purpose is to run the already existing applications that use different technologies and project structures.

Code: 51501 - InternalVideoError: Couldn't play the video.

If you are getting this error in the Emulator it means that your Chrome is blocking the video playback. Kindly read more here: Emulator Limitations in CLI and Box. The quick fix is to click into the window and then refresh the page (F5).

Emulator error