Skip to content

Commit

Permalink
use worker plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo committed Jul 19, 2016
1 parent 372db7c commit 03f8c0a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 54 deletions.
37 changes: 0 additions & 37 deletions example/WorkerShim.js

This file was deleted.

13 changes: 0 additions & 13 deletions example/WorkerShim.worker.js

This file was deleted.

5 changes: 3 additions & 2 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { transfer } from '/src/index.js';
import Worker from './WorkerShim.js';
import Worker from 'worker/WorkerShim';
import workerSrc from './worker.js!worker';

const worker = new Worker('./worker.js');
const worker = new Worker(workerSrc);

worker.addEventListener('message', ({ data }) => {
const canvas = transfer.decode(data);
Expand Down
4 changes: 3 additions & 1 deletion jspm.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ SystemJS.config({
"babel-runtime": "npm:[email protected]",
"core-js": "npm:[email protected]",
"plugin-babel": "npm:[email protected]",
"EventDispatcher": "github:mrdoob/[email protected]"
"EventDispatcher": "github:mrdoob/[email protected]",
"worker": "github:casperlamboo/plugin-worker@master",
"module": "github:jspm/[email protected]"
},
"packages": {
"npm:[email protected]": {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
"EventDispatcher": "github:mrdoob/eventdispatcher.js@^1.0.0",
"babel-runtime": "npm:babel-runtime@^5.8.24",
"core-js": "npm:core-js@^1.1.4",
"plugin-babel": "npm:systemjs-plugin-babel@^0.0.12"
"module": "github:jspm/nodelibs-module@^0.2.0-alpha",
"plugin-babel": "npm:systemjs-plugin-babel@^0.0.12",
"worker": "github:casperlamboo/plugin-worker@master"
},
"peerDependencies": {
"assert": "github:jspm/nodelibs-assert@^0.2.0-alpha",
Expand Down

0 comments on commit 03f8c0a

Please sign in to comment.