Skip to content

Commit 4fde1a1

Browse files
committed
Bump 2.0.0
1 parent f72657b commit 4fde1a1

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ $ npm run clean
145145
$ npm run build
146146
```
147147

148+
## Documentation
149+
150+
* [Quick Start](https://system-runtime.readme.io/docs/quick-start)
151+
* [Guide](https://system-runtime.readme.io/docs/installation)
152+
* [Examples](https://system-runtime.readme.io/docs/a-basic-hello-world)
153+
148154
## Community
149155

150156
* [Code of Conduct](CODE_OF_CONDUCT.md)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "system-runtime",
3-
"version": "2.0.0-rc.8",
3+
"version": "2.0.0",
44
"description": "A JavaScript library that runs systems",
55
"license": "Apache-2.0",
66
"homepage": "https://designfirst.io/systemruntime/",

extensions/mode-admin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@
825825
"state": "$designerSetSystem",
826826
"action": "function $designerSetSystem(system) { \n this.require('logger').level('info');\n\tthis.require('runtime').install(system);\n}",
827827
"useCoreAPI": false,
828-
"core": false
828+
"core": true
829829
}
830830
},
831831
"types": {},

extensions/mode-dev.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"_id": "y1c59d1de591d81e",
1111
"component": "z1f9151698514d13",
1212
"state": "start",
13-
"action": "function start() {\n if (typeof document !== 'undefined') {\n document.addEventListener('dragenter', function dragenter(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function dragover(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function drop(e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function onload(event) {\n json += event.target.result;\n };\n reader.onloadend = function onloadend() {\n var sys = JSON.parse(json);\n runtime.install(sys);\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n}",
13+
"action": "function start() {\n if (typeof document !== 'undefined') {\n runtime.require('logger').level('debug');\n \n document.addEventListener('dragenter', function dragenter(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('dragover', function dragover(e) {\n e.stopPropagation();\n e.preventDefault();\n }, false);\n\n document.addEventListener('drop', function drop(e) {\n e.stopPropagation();\n e.preventDefault();\n var files = e.dataTransfer.files;\n var reader = new FileReader();\n var json = '';\n reader.onload = function onload(event) {\n json += event.target.result;\n };\n reader.onloadend = function onloadend() {\n try {\n var sys = JSON.parse(json);\n runtime.install(sys);\n runtime.require('logger').info('system ' + sys._id + ' has been installed.');\n } catch (e) {\n runtime.require('logger').warn('try to install an invalid system.');\n }\n };\n reader.readAsText(files[0], 'UTF-8');\n });\n }\n}",
1414
"useCoreAPI": false,
15-
"core": false
15+
"core": true
1616
}
1717
},
1818
"types": {},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "system-runtime",
3-
"version": "2.0.0-rc.8",
3+
"version": "2.0.0",
44
"description": "A JavaScript library that runs systems",
55
"homepage": "https://designfirst.io/systemruntime/",
66
"keywords": [

src/behavior.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ function createFunction(name, func, core, useCoreAPI) {
9595

9696
funcBody = func.substring(beginBody + 2, func.length).trim();
9797

98-
if (func.indexOf('{') === 0) {
99-
funcBody = funcBody.substring(0, funcBody.lastIndexOf('}')).trim();
98+
if (funcBody.indexOf('{') === 0) {
99+
funcBody = funcBody.substring(1, funcBody.lastIndexOf('}')).trim();
100100
}
101101

102102
if (funcBody.indexOf('\n') === -1) {

src/db.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,9 @@ function impSystem(importedSystem) {
304304
if (systems[0]._id === importedSystem._id) {
305305
importedSystem.master = true;
306306
} else {
307-
importedSystem.master = true;
308-
systems[0].master = false;
307+
if (importedSystem.master) {
308+
systems[0].master = false;
309+
}
309310
}
310311
}
311312

@@ -362,13 +363,6 @@ function expSystem() {
362363
}
363364
}
364365

365-
for (behaviorId in exportedSystem.behaviors) {
366-
behavior = exportedSystem.behaviors[behaviorId];
367-
if (behavior.state === 'main' || behavior.state === 'start' || behavior.state === 'stop') {
368-
behavior.component = id;
369-
}
370-
}
371-
372366
result = JSON.stringify(exportedSystem);
373367
} else {
374368
result = '{}';

src/systems/classes/_Runtime-class.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"_Runtime": {
7474
"runtime": {
7575
"_id": "runtime",
76-
"version": "2.0.0-rc.8"
76+
"version": "2.0.0"
7777
}
7878
}
7979
},

src/systems/core/system-runtime.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "system-runtime",
33
"master": false,
4-
"version": "2.0.0-rc.8",
4+
"version": "2.0.0",
55
"description": "System Runtime",
66
"schemas": {},
77
"models": {},

0 commit comments

Comments
 (0)