Use new way of requiring Electron modules #238
Conversation
|
I think the best way we could possibly handle this is through a ipc =
try
require 'ipc-renderer'
catch
require 'ipc'Or, on a single line, if that looks better: ipc = try require('ipc-renderer') catch then require('ipc') |
| @@ -1,5 +1,5 @@ | |||
| BrowserWindow = null # Defer require until actually used | |||
| RendererIpc = require 'ipc' | |||
| ipc = try require 'ipc-renderer' catch then require 'ipc' | |||
steelbrain
Dec 18, 2015
I think we should drop support for previous versions because the only place where this will be included will be bumping the version
I think we should drop support for previous versions because the only place where this will be included will be bumping the version
50Wliu
Dec 18, 2015
Author
Member
It was to make specs pass. I'll remove it once a shipped version of Atom contains this.
It was to make specs pass. I'll remove it once a shipped version of Atom contains this.
Hopefully this works.
Use new way of requiring Electron modules

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Refs atom/atom#9627
I'm not sure how to make this backwards-compatible. I assume all it takes is a simple if block (if x require('ipc-renderer') else require('ipc')) but I'm not sure what thexwould be.