Merge remote-tracking branch 'origin/develop' into dbkr/wasm

This commit is contained in:
David Baker 2018-10-02 16:58:31 +01:00
commit 30f0a7932b
19 changed files with 12289 additions and 4528 deletions

View file

@ -52,13 +52,7 @@ function dodep() {
echo "$repo set to branch "`git -C "$repo" rev-parse --abbrev-ref HEAD`
mkdir -p node_modules
rm -r "node_modules/$repo" 2>/dev/null || true
ln -sv "../$repo" node_modules/
(
cd $repo
npm install
)
npm link "./$repo" # This does an npm install for us
}
##############################
@ -77,14 +71,15 @@ echo 'Setting up matrix-react-sdk'
dodep matrix-org matrix-react-sdk
# replace the version of js-sdk that got pulled into react-sdk with a symlink
# replace the version of js-sdk that got pulled into react-sdk with a link
# to our version. Make sure to do this *after* doing 'npm i' in react-sdk,
# otherwise npm helpfully moves another-json from matrix-js-sdk/node_modules
# into matrix-react-sdk/node_modules.
#
# (note this matches the instructions in the README.)
rm -r node_modules/matrix-react-sdk/node_modules/matrix-js-sdk
ln -s ../../matrix-js-sdk node_modules/matrix-react-sdk/node_modules/
cd matrix-react-sdk
npm link ../matrix-js-sdk
cd ../
echo -en 'travis_fold:end:matrix-react-sdk\r'

22
scripts/npm-sub.js Normal file
View file

@ -0,0 +1,22 @@
const path = require('path');
const child_process = require('child_process');
const moduleName = process.argv[2];
if (!moduleName) {
console.error("Expected module name");
process.exit(1);
}
const argString = process.argv.length > 3 ? process.argv.slice(3).join(" ") : "";
if (!argString) {
console.error("Expected an npm argument string to use");
process.exit(1);
}
const modulePath = path.dirname(require.resolve(`${moduleName}/package.json`));
child_process.execSync("npm " + argString, {
env: process.env,
cwd: modulePath,
stdio: ['inherit', 'inherit', 'inherit'],
});