aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakshitkrnagpal <akshitkrnagpal@gmail.com>2018-05-24 20:05:26 +0530
committerSaúl Ibarra Corretgé <s@saghul.net>2018-05-24 17:13:21 +0200
commit923392cf0a9ce4c7830b048266ada7df5c959917 (patch)
tree194a4159fea808a73b4e30a5b8e3998939c38f9b
parentff3b9d9251d10c34123021d6e67a4699ebcac5f4 (diff)
Configured flow
-rw-r--r--.flowconfig13
-rw-r--r--app/features/app/components/App.js4
-rw-r--r--app/features/conference/components/Conference.js7
-rw-r--r--app/index.js3
-rw-r--r--package-lock.json22
-rw-r--r--package.json5
6 files changed, 44 insertions, 10 deletions
diff --git a/.flowconfig b/.flowconfig
new file mode 100644
index 0000000..1c8ac50
--- /dev/null
+++ b/.flowconfig
@@ -0,0 +1,13 @@
+[ignore]
+.*/node_modules/.*
+.*/build/.*
+
+[include]
+
+[libs]
+
+[lints]
+
+[options]
+
+[strict] \ No newline at end of file
diff --git a/app/features/app/components/App.js b/app/features/app/components/App.js
index 2afd502..93ab79f 100644
--- a/app/features/app/components/App.js
+++ b/app/features/app/components/App.js
@@ -1,3 +1,5 @@
+// @flow
+
import React, { Component } from 'react';
import { Conference } from '../../conference';
@@ -6,7 +8,7 @@ import config from '../../config';
/**
* Main component encapsulating the entire application.
*/
-export default class App extends Component {
+export default class App extends Component<{}> {
/**
* Initializes a new {@code App} instance.
*
diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js
index e77ece9..d9aa1e7 100644
--- a/app/features/conference/components/Conference.js
+++ b/app/features/conference/components/Conference.js
@@ -1,3 +1,5 @@
+// @flow
+
import { Component } from 'react';
import {
@@ -5,6 +7,8 @@ import {
setupScreenSharingForWindow,
setupAlwaysOnTopRender,
setupWiFiStats
+
+ // $FlowFixMe
} from 'jitsi-meet-electron-utils';
import config from '../../config';
@@ -12,7 +16,7 @@ import config from '../../config';
/**
* Jitsi Meet Window Component
*/
-export default class Conference extends Component {
+export default class Conference extends Component<{}> {
/**
* Attach the script
*/
@@ -24,6 +28,7 @@ export default class Conference extends Component {
script.onerror = console.error;
script.src = `https://${config.defaultDomain}/external_api.js`;
+ // $FlowFixMe
document.head.appendChild(script);
}
diff --git a/app/index.js b/app/index.js
index 968cd0f..9cd7479 100644
--- a/app/index.js
+++ b/app/index.js
@@ -1,3 +1,5 @@
+// @flow
+
import React from 'react';
import { render } from 'react-dom';
@@ -5,5 +7,6 @@ import { App } from './features/app';
/**
* Render the main / root application.
+ * $FlowFixMe
*/
render(<App />, document.getElementById('app'));
diff --git a/package-lock.json b/package-lock.json
index a520252..b5912b8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4192,6 +4192,12 @@
}
}
},
+ "flow-bin": {
+ "version": "0.72.0",
+ "resolved": "https://registry.npmjs.org/flow-bin/-/flow-bin-0.72.0.tgz",
+ "integrity": "sha1-EgURgPstt8y3KP7+Z8d+lV6SpE0=",
+ "dev": true
+ },
"flow-parser": {
"version": "0.72.0",
"resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.72.0.tgz",
@@ -6160,6 +6166,15 @@
"postis": "2.2.0",
"prebuild-install": "2.5.3",
"robotjs": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd"
+ },
+ "dependencies": {
+ "robotjs": {
+ "version": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd",
+ "requires": {
+ "nan": "2.10.0",
+ "prebuild-install": "2.5.3"
+ }
+ }
}
},
"js-tokens": {
@@ -8823,13 +8838,6 @@
"inherits": "2.0.3"
}
},
- "robotjs": {
- "version": "github:jitsi/robotjs#5cc469f655669e728b61271c2c57ce97d62976fd",
- "requires": {
- "nan": "2.10.0",
- "prebuild-install": "2.5.3"
- }
- },
"run-async": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
diff --git a/package.json b/package.json
index a26c3c1..4bb75ef 100644
--- a/package.json
+++ b/package.json
@@ -8,12 +8,14 @@
"start": "webpack --config ./webpack.config.js --mode development && electron ./build/main.js",
"clean": "rm -rf node_modules",
"lint": "eslint .",
+ "flow": "flow",
"pack": "webpack --config ./webpack.config.js --mode production && electron-packager .",
"postinstall": "electron-rebuild",
"validate": "npm ls"
},
"pre-commit": [
- "lint"
+ "lint",
+ "flow"
],
"repository": {
"type": "git",
@@ -50,6 +52,7 @@
"eslint-plugin-import": "2.11.0",
"eslint-plugin-jsdoc": "3.2.0",
"eslint-plugin-react": "7.7.0",
+ "flow-bin": "0.72.0",
"html-webpack-plugin": "3.2.0",
"node-loader": "0.6.0",
"precommit-hook": "3.0.0",