Skip to content

Commit 44897c3

Browse files
committed
Updated exporting
1 parent 6c1fd01 commit 44897c3

File tree

4 files changed

+112
-104
lines changed

4 files changed

+112
-104
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ to each other.
77

88
* First, import the ProcessSystem create a new instance of one.
99
```javascript
10-
const ProcessSystem = require("erlang-processes");
11-
let system = new ProcessSystem();
10+
const Processes = require("erlang-processes");
11+
let system = new Processes.default.ProcessSystem();
1212
```
1313

1414
* Now you can spawn processes using the system.
@@ -86,8 +86,8 @@ to each other.
8686
An example of a Stack using a GenServer
8787

8888
```javascript
89-
const ProcessSystem = require("erlang-processes");
90-
self.system = self.system || new ProcessSystem();
89+
const Processes = require("erlang-processes");
90+
self.system = self.system || new Processes.default.ProcessSystem();
9191

9292
const Stack = {
9393
init: function(args){

lib/processes.js

Lines changed: 101 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "erlang-processes",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Erlang style processes in JavaScript",
55
"main": "lib/processes.js",
66
"jsnext:main": "src/index.js",

src/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import ProcessSystem from "./processes/process_system";
2+
import GenServer from "./processes/otp/gen_server";
13

2-
export { default as ProcessSystem } from "./processes/process_system";
3-
export { default as GenServer } from "./processes/otp/gen_server";
4+
export default {
5+
ProcessSystem,
6+
GenServer
7+
};

0 commit comments

Comments
 (0)