Skip to content

Commit

Permalink
Use npm bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher J. Brody committed Sep 27, 2015
1 parent e50cbaa commit ecabd82
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions index.js
@@ -0,0 +1,3 @@
var WebWorkerThreads = require('bindings')('WebWorkerThreads');

module.exports = WebWorkerThreads;
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -36,6 +36,7 @@
"js": "env PATH=./node_modules/.bin:\"$PATH\" lsc -cj package.ls;\ngcc deps/minifier/src/minify.c -o deps/minifier/bin/minify;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/worker.ls > src/worker.js;\n./deps/minifier/bin/minify kWorker_js < src/worker.js > src/worker.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/events.ls > src/events.js;\n./deps/minifier/bin/minify kEvents_js < src/events.js > src/events.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/createPool.ls > src/createPool.js;\n./deps/minifier/bin/minify kCreatePool_js < src/createPool.js > src/createPool.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/thread_nextTick.ls > src/thread_nextTick.js;\n./deps/minifier/bin/minify kThread_nextTick_js 1 < src/thread_nextTick.js > src/thread_nextTick.js.c;\nenv PATH=./node_modules/.bin:\"$PATH\" lsc -cbp src/load.ls > src/load.js;\n./deps/minifier/bin/minify kLoad_js 1 1 < src/load.js > src/load.js.c;"
},
"dependencies": {
"bindings": "1.2.x",
"nan": "^2.0.9"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions package.ls
Expand Up @@ -36,6 +36,7 @@ scripts:
./deps/minifier/bin/minify kLoad_js 1 1 < src/load.js > src/load.js.c;
"""
dependencies:
bindings: \1.2.x
nan: \^2.0.9
dev-dependencies:
LiveScript: \1.3.x
Expand Down
2 changes: 1 addition & 1 deletion test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test.ls
@@ -1,5 +1,5 @@
#!/usr/bin/env lsc
{ Worker } = require './'
{ Worker } = (require '.')
w = new Worker ->
# This also works, but less elegant:
# ``onmessage`` = (data: {max}) ->
Expand Down

0 comments on commit ecabd82

Please sign in to comment.