GithubHelp home page GithubHelp logo

david85fr / scion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbeard4/scion

0.0 0.0 0.0 33.11 MB

SCXML/Statecharts in JavaScript, moved to gitlab: https://gitlab.com/scion-scxml/scion

Home Page: https://scion.scxml.io

License: Apache License 2.0

JavaScript 98.79% Shell 0.34% HTML 0.20% CSS 0.67%

scion's Introduction

Overview

Backers on Open Collective Sponsors on Open Collective

SCION is an industrial-strength implementation of W3C SCXML in JavaScript.

SCXML provides a declarative markup for Statecharts, a powerful modelling language for developing complex, timed, event-driven, state-based systems.

Installation

node.js

npm install scxml

browser

Script tag with cdnjs

Add the following script tags to your HTML:

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.23.0/polyfill.min.js">
<script src="https://cdnjs.cloudflare.com/ajax/libs/scion/4.3.1/scxml.min.js">

Then SCION API available as global singleton object scxml.

npm and browserify

Install babel-polyfill and scxml with npm:

npm install --save scxml babel-polyfill

Then add to your application entry point:

require('babel-polyfill');
let scxml = require('scxml');

Quickstart

scxml.urlToModel("drag-and-drop.xml",function(err,model){

  if(err) throw err;

  model.prepare(function(err, fnModel) {

    if(err) throw err;

    //instantiate the interpreter
    var sc = new scxml.scion.Statechart(fnModel);

    //start the interpreter
    sc.start();

    //send the init event
    sc.gen({name:"init",data:rect});

  });
})

API

See the API docs here.

Backwards-compatibility with [email protected]

See the note here.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! ๐Ÿ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Support

To report a bug: file an issue on GitHub.

For general questions: Join the chat at https://gitter.im/SCION-SCXML/Lobby

Build Status

Build status

scion's People

Contributors

jbeard4 avatar feyzo avatar monkeywithacupcake avatar mogsie 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.