Commit graph

22 commits

Author SHA1 Message Date
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Milan Burda
ee7ce3954a fix: don't export __esModule = true by electron.ts (#20939) 2019-11-04 14:16:42 -08:00
Milan Burda
7825d043f2 refactor: unify module-list format and exports/electron (#19697) 2019-08-23 11:18:58 +02:00
Samuel Attard
bc527f6b51
refactor: bundle the browser and renderer process electron code (#18553)
* refactor: bundle the browser and renderer process electron code

* Bundles browser/init and renderer/init
  * Improves load performance of main process by ~40%
  * Improves load performance of renderer process by ~30%
* Prevents users from importing our "requiring" our internal logic such
as ipc-main-internal.  This makes those message buses safer as they are
less accessible, there is still some more work to be done though to lock
down those buses completely.
* The electron.asar file now only contains 2 files, as a future
improvement maybe we can use atom_natives to ship these two files
embedded in the binary
* This also removes our dependency on browserify which had some strange
edge cases that caused us to have to hack around require-order and
stopped us using certain ES6/7 features we should have been able to use
(async / await in some files in the sandboxed renderer init script)

TLDR: Things are faster and better :)

* fix: I really do not want to talk about it

* chore: add performance improvements from debugging

* fix: resolve the provided path so webpack thinks it is absolute

* chore: fixup per PR review

* fix: use webpacks ProvidePlugin to keep global, process and Buffer alive after deletion from global scope for use in internal code

* fix: bundle worker/init as well to make node-in-workers work

* chore: update wording as per feedback

* chore: make the timers hack work when yarn is not used
2019-06-02 13:03:03 -07:00
Samuel Attard
01c442de64 refactor: convert more files to typescript (#16820) 2019-02-12 04:22:33 -10:00
Samuel Attard
176a76217c
chore: have 'use strict' consistently across our lib files (#14721) 2018-09-23 00:28:50 +12:00
Samuel Attard
54ef906832
[RFC] perf: use an internal module resolver to improve require performance (#14633)
* perf: use an internal module resolver instead of relative requires

* perf: memoize the results of getting exported Electron properties

* perf: make internal module changes consistent across sandboxed / bundled files
2018-09-20 13:43:26 +10:00
Thiago de Arruda
44bd93589a Refactor electron exports to keep module list in separate files 2017-03-09 19:08:01 -03:00
Kevin Sawicki
76f112ffc5 Only export TouchBar to start 2017-03-03 14:00:39 -08:00
Samuel Attard
15dcc314d3 Export the TouchBar items as their own props on the electron main export 2017-03-03 14:00:38 -08:00
Samuel Attard
7857c83ea1 Make dynamic buttons work along with click events 2017-03-03 14:00:38 -08:00
Kevin Sawicki
7a99f0435b Fix typo in comment 2017-02-28 08:45:39 -08:00
Kevin Sawicki
bb1a981a01 Mention variable name to update 2017-02-28 08:45:39 -08:00
Kevin Sawicki
e8a79cb88d Don't require browser process module from renderer
This can cause issues when it is accessed from the
require cache or module tree since the getters throw
errors when called.
2017-02-28 08:45:39 -08:00
ali.ibrahim
42adb2afd4 Fixing lint-js issues. 2016-10-12 14:54:22 +02:00
ali.ibrahim
7521aeea09 Implement URLRequest::Delegate, handle thread sync. 2016-10-12 14:54:15 +02:00
ali.ibrahim
e8d4abe78f Adding net module and URLRequest class. 2016-10-12 14:54:15 +02:00
Cheng Zhao
2791f71c03 webContents is now a public module 2016-07-15 10:59:19 +09:00
Cheng Zhao
13f8599ba1 Add systemPreferences module 2016-04-25 11:32:33 +09:00
Zeke Sikelianos
4794385fac first pass at standardizing; suite still passing! 2016-03-30 17:00:30 -07:00
Kevin Sawicki
006c77a00f Update requires paths 2016-03-08 11:14:22 -08:00
Kevin Sawicki
70aa9b06ee Move JavaScript to root lib/ folder 2016-03-08 11:14:21 -08:00