Git Product home page Git Product logo

connect-haxe-sdk's Introduction

Connect Haxe SDK

This is a version of the SDK for CloudBlue Connect platform, written in Haxe. While it allows to write connectors in Haxe itself, the generated code can be used in other languages:

  • C#.
  • Java.
  • JavaScript.
  • PHP.
  • Python.

Documentation on how to use the SDK is available here.

Building

In order to compile the SDK, you must have Haxe 4.0 or higher installed on your machine. On Debian-based Linux distributions, such as Ubuntu and Mint, Haxe can be installed by typing the following on a terminal:

$ sudo apt install haxe

Haxelib and Neko are installed by default (you need Neko to run the unit tests) with this procedure. At the time of writing this README, Haxe 4.0 has not yet been published to the official repositories nor Haxe's PPA, so in the meantime you'll have to follow the installation instructions on the Haxe webpage. Using this procedure, Neko has to be installed separately.

You need to install some libraries to build the SDK using Haxelib:

$ haxelib install dox
$ haxelib install hxcs
$ haxelib install hxjava
$ haxelib install hxnodejs
$ haxelib install munit

To build the SDK for all the available targets, type the following on a terminal:

$ haxe package.hxml

Examples

Examples require you to open the "examples/config.json" file and provide valid credentials.

To run an example written in Haxe, type:

$ haxe example.hxml

This translates the file examples/Example.hx to PHP and runs it.

To run examples written in Java, JavaScript, PHP or Python, respectively run the following on a terminal:

$ ./example_cs.sh
$ ./example_java.sh
$ ./example_js.sh
$ ./example_php.sh
$ ./example_py.sh

The Python version automatically creates a Python3 virtual environment with venv on the _build dir.

If you want to run all the examples, run:

$ ./run_examples.sh

Generating docs and running tests

To generate the documentation, type:

$ haxe doc.hxml

Documentation with be generated in the doc folder.

To run the unit tests on Haxe's builtin interpreter, type:

$ haxelib run munit test -neko

To run the unit tests on all supported platforms, type:

$ haxelib run munit test -cs -java -js -php -python

To enable code coverage reporting, just add -coverage to the previous command. Right now, it does not work on JavaScript.

connect-haxe-sdk's People

Contributors

javicerveraingram avatar adrian-im avatar javicervera avatar marcserrat avatar othercodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.