This repository has been archived by the owner on Sep 25, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged 2.0.0 and expresscion branch into master.
- Loading branch information
Showing
58 changed files
with
11,221 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
*.pyc | ||
*.sw* | ||
Session.vim | ||
target | ||
node_modules | ||
build | ||
src/demo/node-repl/build/ | ||
src/demo/nodejs/build/ | ||
scion-browser.js | ||
scion-browser-min.js | ||
TODO | ||
log | ||
components | ||
out* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
language: node_js | ||
node_js: | ||
- 0.8 | ||
- 0.12 | ||
- 0.11 | ||
- 0.10 | ||
- 0.8 | ||
before_install: | ||
- git submodule update --init --recursive | ||
- npm install -g npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
js = $(shell find lib/ -name "*.js") | ||
|
||
all : dist/scion.js dist/scion-min.js | ||
all : dist/scxml.js dist/scxml.min.js | ||
|
||
dist/scion.js : $(js) | ||
mkdir -p dist && node lib/browser/build/stitch.js dist/scion.js | ||
dist/scxml.js : $(js) | ||
component build -o dist -n scxml -s scxml | ||
|
||
dist/scion-min.js : dist/scion.js | ||
uglifyjs dist/scion.js > dist/scion-min.js | ||
dist/scxml.min.js : dist/scxml.js | ||
uglifyjs dist/scxml.js > dist/scxml.min.js | ||
|
||
clean : | ||
rm -rf dist | ||
get-deps : | ||
npm install -g component uglifyjs | ||
component install | ||
|
||
.PHONY : clean all | ||
clean : | ||
rm dist/* | ||
|
||
.PHONY : get-deps all clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env node | ||
//A simple scxml interactive simulation environment | ||
var scxml = require('..'), | ||
repl = require('repl'); | ||
|
||
var pathToScxml = process.argv[2]; | ||
|
||
if(!pathToScxml){ | ||
console.log('Usage: scxml foo.scxml'); | ||
process.exit(1); | ||
} | ||
|
||
//1 - 2. get the xml file and convert it to jsonml | ||
scxml.pathToModel(pathToScxml,function(err,model){ | ||
|
||
if(err){ | ||
throw err; | ||
} | ||
|
||
//Use the statechart object model to instantiate an instance of the statechart interpreter. Optionally, we can pass to the construct an object to be used as the context object (the 'this' object) in script evaluation. Lots of other parameters are available. | ||
var interpreter = new scxml.scion.Statechart(model); | ||
|
||
interpreter.start(); | ||
|
||
console.log(interpreter.getConfiguration()); | ||
|
||
var parseRE = /\((.*)\n\)/; | ||
|
||
function processEvent(cmd,dontKnow,alsoDontKnow,callback){ | ||
var e = cmd.match(parseRE)[1]; | ||
interpreter.gen({name : e}); | ||
var conf = interpreter.getConfiguration(); | ||
callback(null,conf); | ||
} | ||
|
||
//start | ||
repl.start('#',process.stdin,processEvent); | ||
|
||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "scxml", | ||
"repo": "jbeard4/scxml.js", | ||
"description": "An implementation of SCXML in portable ECMAScript.", | ||
"version": "0.0.4", | ||
"keywords": [ | ||
"scxml", | ||
"statecharts", | ||
"w3c", | ||
"javascript" | ||
], | ||
"dependencies": { | ||
"jbeard4/scion-ng": "*", | ||
"isaacs/sax-js": "*" | ||
}, | ||
"development": {}, | ||
"license": "Apache-2.0", | ||
"main" : "lib/runtime/platform-bootstrap/browser/index.js", | ||
"scripts": [ | ||
"lib/compiler/scxml-to-scjson.js", | ||
"lib/compiler/scjson-to-module.js", | ||
"lib/runtime/transform/util.js", | ||
"lib/runtime/transform/inline-srcs.js", | ||
"lib/runtime/platform-bootstrap/browser/path.js", | ||
"lib/runtime/platform-bootstrap/browser/url.js", | ||
"lib/runtime/platform-bootstrap/browser/platform.js", | ||
"lib/runtime/platform-bootstrap/browser/index.js", | ||
"lib/runtime/platform-bootstrap/platform.js", | ||
"lib/runtime/document-string-to-model.js", | ||
"lib/runtime/facade.js" | ||
] | ||
} | ||
|
Oops, something went wrong.