From 8a2b2daad77b7b34990794ac074c65f27f7de4d4 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 15 Aug 2016 12:13:58 +0100 Subject: [PATCH] Revert "Unpin react-sdk and js-sdk" I messed this up and removed staticfiles.js by accident This reverts commit 21334cab2825bb6306507d4341a3df4a7a81d4f9. --- package.json | 4 ++-- scripts/staticfiles.js | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 scripts/staticfiles.js diff --git a/package.json b/package.json index 64c1d38aaa..56dc7ee26f 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.0.0-beta.4", - "matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", - "matrix-react-sdk": "matrix-org/matrix-react-sdk#develop", + "matrix-js-sdk": "0.5.5", + "matrix-react-sdk": "0.6.4-r1", "modernizr": "^3.1.0", "q": "^1.4.1", "react": "^15.2.1", diff --git a/scripts/staticfiles.js b/scripts/staticfiles.js new file mode 100755 index 0000000000..3dbf451cd3 --- /dev/null +++ b/scripts/staticfiles.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node + +// copy static files from node_modules to the vector directory +// + +var fs = require('fs-extra'); + +function exists(f) { + try { + fs.statSync(f); + return true; + } catch(e) { + return false; + } +} + +const olm = 'node_modules/olm/olm.js'; +if (exists(olm)) { + console.log("copy", olm, "-> vector"); + fs.copySync(olm, 'vector/olm.js'); +}