Skip to content

Commit

Permalink
add convenience/help proxy for workerize-loader
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jan 17, 2018
1 parent a893c30 commit 15d0cd8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
try {
module.exports = require('workerize-loader');
}
catch (e) {
console.warn("Warning: workerize-loader is not installed.");
module.exports = function() {
throw "To use workerize as a loader, you must install workerize-loader.";
}
}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
"version": "0.1.2",
"description": "Run a module in a Web Worker.",
"main": "dist/workerize.js",
"module": "src/index.js",
"module": "dist/workerize.m.js",
"source": "src/index.js",
"repository": "developit/workerize",
"loader": "./loader.js",
"scripts": {
"build": "microbundle",
"prepublishOnly": "npm run build",
"release": "npm t && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish",
"test": "echo \"Error: no test specified\" && exit 0"
},
"files": [
"src",
"dist",
"loader.js"
],
"keywords": [
"worker",
"web workers",
Expand Down

0 comments on commit 15d0cd8

Please sign in to comment.