- rename test:multi npm target to test-multi, for consistency with react-sdk
- base karma webpack config on the distribution one
- include Olm if we have it
- don't use the karma source loader - it's pointless given we webpack
everything.
- turn off module listing in the webpack stats to shorten the console output
Otherwise Chrome thinks you're working on a new file every time
you refresh and therefore closes source tabs and removes
breakpoints which is very annoying. It also allegedly makes
webpack-dev-server run out of memory because it has to remember
all the different files.
Use postcss-webpack-loader instead of webpack-cli to process the scss. Doing so
mostly means that we avoid the problem that webpack-dev-server fails to start
if we haven't already built the CSS. (It also simplifies package.json somewhat,
which is no bad thing)
* Revert 79d164309f
as it seems to break shortcuts altogether
* Update electron-builder (and add the squirrel windows package
that the newer version now requires: it's been split out). This
uses a newer version of squirrel which has some fixes for
shortcuts.
I'm unsure exactly what was going wrong originally in
https://github.com/vector-im/riot-web/issues/2775 but #79d1643
seems to break shortcut creation as far as I can see.
All of those cpx invocations were getting unwieldy, and I suspect the exotic
quoting needed to run them under parallelshell was breaking things on windows.
Replace the unwieldy cpx invocations with an unwieldy custom script.
which it turns out is by far the lesser of two evils.
* Auto-update works with a proxy
* The update process is reasonably atomic & faster, rather than
running the uninstaller then the installer, leaving you with a
broken install if you shut down your machine at the wrong time
* Gets the update URL the same way as on mac, rather than baking
it into the app at build time from package.json. We don't want
it in package.json because only our builds want our update URL.
Amalgamate the electron build packaging into one script.
Use update_base_url so we can compute the actual URL in the
script for windows (because we need to put it in the build) and
at runtime for mac os.
* Remove squirrel hooks (the installing & uninstalling is now
done by the, er, installer)
* Switch to electron-auto-update
* Shorten initial update delay because we no longer need to wait
for squirrel to release a lock file
* Change update URLs because windows is now one installer for
both 32 & 64 bit.
* Update electron-builder to 10 where NSIS is now the default
target for Windows.
* Add linux to the target list, building a deb.
* Remove sqirrel-specific installation spinner
* Remove redundant !**/* from files
* Implement the squirrel install / uninstall hooks (so we have
a start menu entry / desktop shortcut)
* Wait longer before checking for update
* Set the window icon
* Add a 'file' menu
* Bump electron-builder
* Add the icon url for the control panel entry
Advantages:
* blocks while a rebuild is in progress so you're less likely to reload the
old version
* serves from memory rather than disk, so we no longer need to turn off the
cachebuster to avoid filling the disk with bundles. Empirically, seems to
last a plausible amount of time without OOMing; there's no real reason to
believe it would use any more memory than webpack itself.
* That in turn means we no longer need the hack to stop chrome caching old
sourcemaps (because the sourcemap now has a cachebuster in its name).
* one fewer process for parallelshell to (fail to) manage.
* in future, we could consider the fancy hot-reload functionality.
We ended up including all sorts of stuff in our published packages. Let's take
the opposite approach and include useful stuff rather than exclude unuseful
stuff.
This means that clients can do better caching of assets, as it will mean we are
no longer reliant on etags to ensure that clients get a fresh version.
We inhibit the cachebuster for `npm start`, so that we don't get millions of
copies of the bundles on dev boxes.
Also sort out regenerator runtime as it turns out importing
babel-polyfill in your code is insufficient if using webpack
because it's imported too late, so use both that and
regenerator-runtime. Sigh.
Also sort out regenerator runtime as it turns out importing
babel-polyfill in your code is insufficient if using webpack
because it's imported too late, so use both that and
regenerator-runtime. Sigh.