We've been relying on flow being close enough to TypeScript for so long that it is starting to run into issues. Here we switch to babel's parser given we already use babel in the project.
Babel's parser is also *slightly* faster, allowing us to generate strings 0.1s faster.
On a freshly install of the developer environment, the build:jitsi try
to create a file in ./webapp with the cURL command. However, ./webapp
folder doesn't exist and the build script crash. This patch makes sure
the appropriate folder is created if it doesn't already exist
Signed-off-by: Danny Colin <contact@dannycolin.com>
Includes: compilation, translations, IDE support (use .tsx not .ts), typings, and other build tools.
TypeScript component have to import PropTypes and React with `import * as React from 'react';`
This document is required for example for all Mozilla websites
and makes sense for Riot to also describe itself - see
https://www.contributejson.org/
Signed-off-by: Jason Robinson <jasonr@matrix.org>
We were checking out & installing the develop js-sdk explicitly
in cases where we didn't need it at all. We were babeling the src
folder many, many times over (in some cases twice in the same job)
and never using the output at all.
Fixes https://github.com/vector-im/riot-web/issues/11864
This uses an environment variable because the build script assumes you want a production build, but we don't for this particular script. To avoid having a mess of NPM scripts to worry about, we'll just pass a flag down.
There's a bunch of generated files that webpack relies on to work, and Karma works off webpack. To make both happy we've added
a new `build:genfiles` script which takes care of this for us. We also have to install and build our other layers to get the
same effect (like generating the react-sdk's component index, while we still have one).
This commit also fixes all the imports in the tests because they were just wrong. They should have been caught in the ES6ification
earlier, but were missed.
We have to convert *something* to TypeScript so it doesn't complain that there's nothing to compile, so this converts the easiest utility library.
Many of the scripts are copied from the react-sdk.