-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For the application cache worker so it won't hold up the main thread.
- Loading branch information
Blaine Schmeisser
committed
Aug 27, 2016
1 parent
b397c7d
commit d7a47e4
Showing
3 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const fork = require('child_process').fork | ||
const path = require('path') | ||
|
||
module.exports = (pluginContext) => { | ||
const { cwd } = pluginContext | ||
const appCacheProcess = path.join(cwd, 'appCache.js') | ||
return () => { | ||
const runner = fork(appCacheProcess, {cwd}) | ||
return new Promise((resolve) => { | ||
runner.on('exit', resolve) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters