Browse Source

Configured flow

fix-builder
akshitkrnagpal 4 years ago committed by Saúl Ibarra Corretgé
parent
commit
923392cf0a
  1. 13
      .flowconfig
  2. 4
      app/features/app/components/App.js
  3. 7
      app/features/conference/components/Conference.js
  4. 3
      app/index.js
  5. 22
      package-lock.json
  6. 5
      package.json

13
.flowconfig

@ -0,0 +1,13 @@
[ignore]
.*/node_modules/.*
.*/build/.*
[include]
[libs]
[lints]
[options]
[strict]

4
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.
*

7
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);
}

3
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'));

22
package-lock.json generated

@ -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",

5
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",

Loading…
Cancel
Save