Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

feat: add support for webworkers #14

Merged
merged 1 commit into from
Jan 27, 2017
Merged

feat: add support for webworkers #14

merged 1 commit into from
Jan 27, 2017

Conversation

dignifiedquire
Copy link
Member

Based on the work in #11 and #12

@@ -7,14 +7,14 @@
"./src/crypto-sha1-2.js": "./src/crypto-sha1-2-browser.js"
},
"scripts": {
"test": "aegir-test",
"test:browser": "aegir-test browser",
"test": "aegir-test --webworker",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this 'just webworker'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you are proposing to just run the tests in a webworker??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no, sorry this means run tests also in webworker, that's why it's not --env webworker.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests now run three times, once in node, once in the browser without webworkers and once inside webworkers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aegir could use an update to something like: --runtime=node, browser, webworker

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aegir could use a proper cli interface yes...but don't know when to do things like that...

} else if (typeof self !== 'undefined') {
globalContext = self
} else {
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this throw an error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the throwing happens below

@@ -7,14 +7,14 @@
"./src/crypto-sha1-2.js": "./src/crypto-sha1-2-browser.js"
},
"scripts": {
"test": "aegir-test",
"test:browser": "aegir-test browser",
"test": "aegir-test --webworker",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you are proposing to just run the tests in a webworker??

@dignifiedquire dignifiedquire merged commit 240ed0b into master Jan 27, 2017
@dignifiedquire dignifiedquire removed the status/in-progress In progress label Jan 27, 2017
@dignifiedquire dignifiedquire deleted the webworker branch January 27, 2017 11:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants