This is required for jsdom to do the right thing.
We also have to bump the jsdom version, but to do that we need an alternative test environment because Jest has it pinned lower.
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 previously ignored this whole directory, and it's a bit of wishful thinking that we'll have these delinted as a result.
Switching to Jest should fix most of the problems anyways, so we can enable the linter when we get there.
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.
Run `yarn install` in the js-sdkc and react-sdk installs. We were
avoiding this before due to using babel dependencies from riot-web
ro build js-sdk, which worked as long as the installed babel versions
and plugins were identical. js-sdk has now been upgraded to babel 7
and so that no longer worked.
This will probably cause react-sdk & js-sdk to be built an
unnecessary number of times.
This moves the babel and postcss configs into the webpack config for ease of maintenance (and because we need variations of them). The typescript config is left outside the webpack config for IDEs to pick it up.
Add babel plugin until the js-sdk stop using bluebird, since we
force-recompile the js-sdk so we need the plugin installed for that
to work (and it's a devDependency on js-sdk so doesn't otherwise get
installed).
Add babel plugin until the js-sdk stop using bluebird, since we
force-recompile the js-sdk so we need the plugin installed for that
to work (and it's a devDependency on js-sdk so doesn't otherwise get
installed).