├── app ├── utils │ └── .gitkeep ├── components │ ├── Home.css │ ├── Home.js │ ├── Counter.css │ └── Counter.js ├── app.icns ├── yarn.lock ├── containers │ ├── HomePage.js │ ├── App.js │ ├── CounterPage.js │ └── Root.js ├── store │ ├── configureStore.js │ ├── configureStore.prod.js │ └── configureStore.dev.js ├── reducers │ ├── index.js │ └── counter.js ├── app.global.css ├── package.json ├── routes.js ├── index.js ├── .eslintrc ├── actions │ └── counter.js ├── app.html └── main.dev.js ├── README.md ├── internals ├── mocks │ └── fileMock.js ├── flow │ ├── WebpackAsset.js.flow │ └── CSSModule.js.flow ├── img │ ├── js.png │ ├── npm.png │ ├── flow.png │ ├── jest.png │ ├── react.png │ ├── redux.png │ ├── yarn.png │ ├── eslint.png │ ├── webpack.png │ ├── js-padded.png │ ├── eslint-padded.png │ ├── flow-padded.png │ ├── jest-padded.png │ ├── react-padded.png │ ├── react-router.png │ ├── redux-padded.png │ ├── yarn-padded.png │ ├── flow-padded-90.png │ ├── jest-padded-90.png │ ├── react-padded-90.png │ ├── redux-padded-90.png │ ├── webpack-padded.png │ ├── yarn-padded-90.png │ ├── eslint-padded-90.png │ ├── webpack-padded-90.png │ ├── react-router-padded.png │ └── react-router-padded-90.png └── scripts │ ├── CheckNodeEnv.js │ └── CheckBuiltsExist.js ├── .stylelintrc ├── .gitattributes ├── resources ├── icon.ico ├── icon.png ├── icon.icns └── icons │ ├── 16x16.png │ ├── 24x24.png │ ├── 32x32.png │ ├── 48x48.png │ ├── 64x64.png │ ├── 96x96.png │ ├── 128x128.png │ ├── 256x256.png │ ├── 512x512.png │ └── 1024x1024.png ├── flow-typed ├── module_vx.x.x.js └── npm │ ├── flow-bin_v0.x.x.js │ ├── font-awesome_vx.x.x.js │ ├── rimraf_v2.x.x.js │ ├── minimist_v1.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── url-loader_vx.x.x.js │ ├── file-loader_vx.x.x.js │ ├── electron-debug_vx.x.x.js │ ├── babel-preset-react_vx.x.x.js │ ├── babel-preset-stage-0_vx.x.x.js │ ├── babili-webpack-plugin_vx.x.x.js │ ├── eslint-formatter-pretty_vx.x.x.js │ ├── babel-preset-react-optimize_vx.x.x.js │ ├── stylelint-config-standard_vx.x.x.js │ ├── babel-plugin-dev-expression_vx.x.x.js │ ├── babel-plugin-dynamic-import-webpack_vx.x.x.js │ ├── babel-plugin-transform-class-properties_vx.x.x.js │ ├── react-addons-css-transition-group_v15.x.x.js │ ├── babel-preset-react-hmre_vx.x.x.js │ ├── devtron_vx.x.x.js │ ├── eslint-import-resolver-webpack_vx.x.x.js │ ├── babel-plugin-add-module-exports_vx.x.x.js │ ├── babel-register_vx.x.x.js │ ├── concurrently_vx.x.x.js │ ├── electron_vx.x.x.js │ ├── redux-thunk_vx.x.x.js │ ├── cross-env_vx.x.x.js │ ├── extract-text-webpack-plugin_vx.x.x.js │ ├── webpack-merge_vx.x.x.js │ ├── source-map-support_vx.x.x.js │ ├── html-webpack-plugin_vx.x.x.js │ ├── style-loader_vx.x.x.js │ ├── babel-plugin-transform-es2015-classes_vx.x.x.js │ ├── redux-logger_vx.x.x.js │ ├── babel-loader_vx.x.x.js │ ├── eslint-plugin-flowtype-errors_vx.x.x.js │ ├── sass-loader_vx.x.x.js │ ├── spectron_vx.x.x.js │ ├── react-addons-test-utils_v15.x.x.js │ ├── enzyme-to-json_vx.x.x.js │ ├── eslint-plugin-jest_vx.x.x.js │ ├── electron-devtools-installer_vx.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── cross-spawn_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── css-loader_vx.x.x.js │ ├── babel-preset-env_vx.x.x.js │ ├── eslint-plugin-compat_vx.x.x.js │ ├── fbjs-scripts_vx.x.x.js │ ├── react-router-redux_vx.x.x.js │ ├── chalk_v2.x.x.js │ ├── react-redux_v5.x.x.js │ ├── redux_v3.x.x.js │ ├── react-router_v4.x.x.js │ ├── enzyme_v2.3.x.js │ ├── react-hot-loader_vx.x.x.js │ ├── history_vx.x.x.js │ ├── identity-obj-proxy_vx.x.x.js │ ├── webpack-bundle-analyzer_vx.x.x.js │ ├── react-router-dom_v4.x.x.js │ ├── stylefmt_vx.x.x.js │ ├── webpack-dev-server_vx.x.x.js │ └── eslint-plugin-promise_vx.x.x.js ├── webpack.config.eslint.js ├── test ├── example.js ├── .eslintrc ├── actions │ ├── __snapshots__ │ │ └── counter.spec.js.snap │ └── counter.spec.js ├── reducers │ ├── __snapshots__ │ │ └── counter.spec.js.snap │ └── counter.spec.js ├── runTests.js ├── components │ ├── __snapshots__ │ │ └── Counter.spec.js.snap │ └── Counter.spec.js ├── containers │ └── CounterPage.spec.js └── e2e │ └── e2e.spec.js ├── .editorconfig ├── appveyor.yml ├── .babelrc ├── .travis.yml ├── .flowconfig ├── .eslintignore ├── .gitignore ├── webpack.config.base.js ├── .eslintrc ├── webpack.config.main.prod.js ├── LICENSE ├── webpack.config.renderer.prod.js └── webpack.config.renderer.dev.dll.js /app/utils/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/components/Home.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # node-daw 2 | Digital Audio Workstation by Electron 3 | -------------------------------------------------------------------------------- /internals/mocks/fileMock.js: -------------------------------------------------------------------------------- 1 | export default 'test-file-stub'; 2 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard" 3 | } 4 | -------------------------------------------------------------------------------- /app/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/app/app.icns -------------------------------------------------------------------------------- /internals/flow/WebpackAsset.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | declare export default string 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | *.png binary 3 | *.ico binary 4 | *.icns binary 5 | -------------------------------------------------------------------------------- /resources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icon.ico -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icon.png -------------------------------------------------------------------------------- /internals/img/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/js.png -------------------------------------------------------------------------------- /internals/img/npm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/npm.png -------------------------------------------------------------------------------- /resources/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icon.icns -------------------------------------------------------------------------------- /flow-typed/module_vx.x.x.js: -------------------------------------------------------------------------------- 1 | declare module 'module' { 2 | declare module.exports: any; 3 | } 4 | -------------------------------------------------------------------------------- /internals/flow/CSSModule.js.flow: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | declare export default { [key: string]: string } -------------------------------------------------------------------------------- /internals/img/flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/flow.png -------------------------------------------------------------------------------- /internals/img/jest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/jest.png -------------------------------------------------------------------------------- /internals/img/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/react.png -------------------------------------------------------------------------------- /internals/img/redux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/redux.png -------------------------------------------------------------------------------- /internals/img/yarn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/yarn.png -------------------------------------------------------------------------------- /internals/img/eslint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/eslint.png -------------------------------------------------------------------------------- /internals/img/webpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/webpack.png -------------------------------------------------------------------------------- /resources/icons/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/16x16.png -------------------------------------------------------------------------------- /resources/icons/24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/24x24.png -------------------------------------------------------------------------------- /resources/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/32x32.png -------------------------------------------------------------------------------- /resources/icons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/48x48.png -------------------------------------------------------------------------------- /resources/icons/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/64x64.png -------------------------------------------------------------------------------- /resources/icons/96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/96x96.png -------------------------------------------------------------------------------- /internals/img/js-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/js-padded.png -------------------------------------------------------------------------------- /resources/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/128x128.png -------------------------------------------------------------------------------- /resources/icons/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/256x256.png -------------------------------------------------------------------------------- /resources/icons/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/512x512.png -------------------------------------------------------------------------------- /internals/img/eslint-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/eslint-padded.png -------------------------------------------------------------------------------- /internals/img/flow-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/flow-padded.png -------------------------------------------------------------------------------- /internals/img/jest-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/jest-padded.png -------------------------------------------------------------------------------- /internals/img/react-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/react-padded.png -------------------------------------------------------------------------------- /internals/img/react-router.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/react-router.png -------------------------------------------------------------------------------- /internals/img/redux-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/redux-padded.png -------------------------------------------------------------------------------- /internals/img/yarn-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/yarn-padded.png -------------------------------------------------------------------------------- /resources/icons/1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/resources/icons/1024x1024.png -------------------------------------------------------------------------------- /app/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /internals/img/flow-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/flow-padded-90.png -------------------------------------------------------------------------------- /internals/img/jest-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/jest-padded-90.png -------------------------------------------------------------------------------- /internals/img/react-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/react-padded-90.png -------------------------------------------------------------------------------- /internals/img/redux-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/redux-padded-90.png -------------------------------------------------------------------------------- /internals/img/webpack-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/webpack-padded.png -------------------------------------------------------------------------------- /internals/img/yarn-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/yarn-padded-90.png -------------------------------------------------------------------------------- /internals/img/eslint-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/eslint-padded-90.png -------------------------------------------------------------------------------- /internals/img/webpack-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/webpack-padded-90.png -------------------------------------------------------------------------------- /webpack.config.eslint.js: -------------------------------------------------------------------------------- 1 | require('babel-register'); 2 | 3 | module.exports = require('./webpack.config.renderer.dev'); 4 | -------------------------------------------------------------------------------- /internals/img/react-router-padded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/react-router-padded.png -------------------------------------------------------------------------------- /internals/img/react-router-padded-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rijn/node-daw/master/internals/img/react-router-padded-90.png -------------------------------------------------------------------------------- /test/example.js: -------------------------------------------------------------------------------- 1 | describe('description', () => { 2 | it('should have description', () => { 3 | expect(1 + 2).toBe(3); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /app/containers/HomePage.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import Home from '../components/Home'; 4 | 5 | export default class HomePage extends Component { 6 | render() { 7 | return ( 8 | 9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest/globals": true 4 | }, 5 | "plugins": [ 6 | "jest" 7 | ], 8 | "rules": { 9 | "jest/no-disabled-tests": "warn", 10 | "jest/no-focused-tests": "error", 11 | "jest/no-identical-title": "error" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/store/configureStore.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | if (process.env.NODE_ENV === 'production') { 3 | module.exports = require('./configureStore.prod'); // eslint-disable-line global-require 4 | } else { 5 | module.exports = require('./configureStore.dev'); // eslint-disable-line global-require 6 | } 7 | -------------------------------------------------------------------------------- /app/reducers/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { combineReducers } from 'redux'; 3 | import { routerReducer as router } from 'react-router-redux'; 4 | import counter from './counter'; 5 | 6 | const rootReducer = combineReducers({ 7 | counter, 8 | router, 9 | }); 10 | 11 | export default rootReducer; 12 | -------------------------------------------------------------------------------- /app/app.global.css: -------------------------------------------------------------------------------- 1 | @import "~font-awesome/css/font-awesome.css"; 2 | @import '~@blueprintjs/core/dist/blueprint.css'; 3 | 4 | body { 5 | position: relative; 6 | color: white; 7 | height: 100vh; 8 | font-family: Arial, Helvetica, Helvetica Neue, serif; 9 | overflow-y: hidden; 10 | } 11 | 12 | button:focus {outline:0;} 13 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "daw-app", 3 | "version": "1.0.0", 4 | "main": "./main.prod.js", 5 | "scripts": { 6 | "postinstall": "npm rebuild --runtime=electron --target=1.6.6 --disturl=https://atom.io/download/atom-shell --build-from-source" 7 | }, 8 | "license": "MIT", 9 | "dependencies": { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/containers/App.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import type { Children } from 'react'; 4 | 5 | export default class App extends Component { 6 | props: { 7 | children: Children 8 | }; 9 | 10 | render() { 11 | return ( 12 |
13 | {this.props.children} 14 |
15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test/actions/__snapshots__/counter.spec.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`actions should decrement should create decrement action 1`] = ` 4 | Object { 5 | "type": "DECREMENT_COUNTER", 6 | } 7 | `; 8 | 9 | exports[`actions should increment should create increment action 1`] = ` 10 | Object { 11 | "type": "INCREMENT_COUNTER", 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /test/reducers/__snapshots__/counter.spec.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducers counter should handle DECREMENT_COUNTER 1`] = `0`; 4 | 5 | exports[`reducers counter should handle INCREMENT_COUNTER 1`] = `2`; 6 | 7 | exports[`reducers counter should handle initial state 1`] = `0`; 8 | 9 | exports[`reducers counter should handle unknown action type 1`] = `1`; 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.{json,js,jsx,html,css,yml}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [.eslintrc] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /internals/scripts/CheckNodeEnv.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import chalk from 'chalk'; 3 | 4 | export default function CheckNodeEnv(expectedEnv: string) { 5 | if (!expectedEnv) { 6 | throw new Error('"expectedEnv" not set'); 7 | } 8 | 9 | if (process.env.NODE_ENV !== expectedEnv) { 10 | console.log(chalk.whiteBright.bgRed.bold( 11 | `"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config` 12 | )); 13 | process.exit(2); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/runTests.js: -------------------------------------------------------------------------------- 1 | const spawn = require('cross-spawn'); 2 | const path = require('path'); 3 | 4 | const s = `\\${path.sep}`; 5 | const pattern = process.argv[2] === 'e2e' 6 | ? `test${s}e2e${s}.+\\.spec\\.js` 7 | : `test${s}(?!e2e${s})[^${s}]+${s}.+\\.spec\\.js$`; 8 | 9 | const result = spawn.sync( 10 | path.normalize('./node_modules/.bin/jest'), 11 | [pattern, ...process.argv.slice(2)], 12 | { stdio: 'inherit' } 13 | ); 14 | 15 | process.exit(result.status); 16 | -------------------------------------------------------------------------------- /app/routes.js: -------------------------------------------------------------------------------- 1 | /* eslint flowtype-errors/show-errors: 0 */ 2 | import React from 'react'; 3 | import { Switch, Route } from 'react-router'; 4 | import App from './containers/App'; 5 | import HomePage from './containers/HomePage'; 6 | import CounterPage from './containers/CounterPage'; 7 | 8 | export default () => ( 9 | 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /app/containers/CounterPage.js: -------------------------------------------------------------------------------- 1 | import { bindActionCreators } from 'redux'; 2 | import { connect } from 'react-redux'; 3 | import Counter from '../components/Counter'; 4 | import * as CounterActions from '../actions/counter'; 5 | 6 | function mapStateToProps(state) { 7 | return { 8 | counter: state.counter 9 | }; 10 | } 11 | 12 | function mapDispatchToProps(dispatch) { 13 | return bindActionCreators(CounterActions, dispatch); 14 | } 15 | 16 | export default connect(mapStateToProps, mapDispatchToProps)(Counter); 17 | -------------------------------------------------------------------------------- /app/containers/Root.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { Provider } from 'react-redux'; 4 | import { ConnectedRouter } from 'react-router-redux'; 5 | import Routes from '../routes'; 6 | 7 | type RootType = { 8 | store: {}, 9 | history: {} 10 | }; 11 | 12 | export default function Root({ store, history }: RootType) { 13 | return ( 14 | 15 | 16 | 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /app/reducers/counter.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter'; 3 | 4 | export type counterStateType = { 5 | +counter: number 6 | }; 7 | 8 | type actionType = { 9 | +type: string 10 | }; 11 | 12 | export default function counter(state: number = 0, action: actionType) { 13 | switch (action.type) { 14 | case INCREMENT_COUNTER: 15 | return state + 1; 16 | case DECREMENT_COUNTER: 17 | return state - 1; 18 | default: 19 | return state; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/components/Home.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { Link } from 'react-router-dom'; 4 | import { Button } from '@blueprintjs/core'; 5 | import styles from './Home.css'; 6 | 7 | export default class Home extends Component { 8 | render() { 9 | return ( 10 |
11 |
12 |

Home

13 | to Counter 14 | 15 |
16 |
17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /flow-typed/npm/font-awesome_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 47fce314d331f58fe7cbf4f3a1e814cf 2 | // flow-typed version: <>/font-awesome_v^4.7.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'font-awesome' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'font-awesome' { 17 | declare module.exports: any; 18 | } 19 | -------------------------------------------------------------------------------- /flow-typed/npm/rimraf_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1dff23447d5e18f5ac2b05aaec7cfb74 2 | // flow-typed version: a453e98ea2/rimraf_v2.x.x/flow_>=v0.25.0 3 | 4 | declare module 'rimraf' { 5 | declare type Options = { 6 | maxBusyTries?: number, 7 | emfileWait?: number, 8 | glob?: boolean, 9 | disableGlob?: boolean 10 | }; 11 | 12 | declare type Callback = (err: ?Error, path: ?string) => void; 13 | 14 | declare module.exports: { 15 | (f: string, opts?: Options | Callback, callback?: Callback): void; 16 | sync(path: string, opts?: Options): void; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | os: unstable 2 | 3 | environment: 4 | matrix: 5 | - nodejs_version: 8 6 | - nodejs_version: 7 7 | 8 | cache: 9 | - "%LOCALAPPDATA%/Yarn" 10 | - node_modules -> package.json 11 | - app/node_modules -> app/package.json 12 | 13 | matrix: 14 | fast_finish: true 15 | 16 | build: off 17 | 18 | version: '{build}' 19 | 20 | shallow_clone: true 21 | 22 | clone_depth: 1 23 | 24 | install: 25 | - ps: Install-Product node $env:nodejs_version 26 | - set CI=true 27 | - yarn 28 | - cd app && yarn 29 | 30 | test_script: 31 | - node --version 32 | - yarn lint 33 | - yarn package 34 | - yarn test 35 | - yarn test-e2e 36 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "targets": { "node": 7 }, 5 | "useBuiltIns": true 6 | }], 7 | "stage-0", 8 | "react" 9 | ], 10 | "plugins": ["add-module-exports", "dynamic-import-webpack"], 11 | "env": { 12 | "production": { 13 | "presets": ["react-optimize"], 14 | "plugins": ["babel-plugin-dev-expression"] 15 | }, 16 | "development": { 17 | "plugins": [ 18 | "transform-class-properties", 19 | "transform-es2015-classes", 20 | ["flow-runtime", { 21 | "assert": true, 22 | "annotate": true 23 | }] 24 | ] 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/store/configureStore.prod.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { createStore, applyMiddleware } from 'redux'; 3 | import thunk from 'redux-thunk'; 4 | import { createBrowserHistory } from 'history'; 5 | import { routerMiddleware } from 'react-router-redux'; 6 | import rootReducer from '../reducers'; 7 | import type { counterStateType } from '../reducers/counter'; 8 | 9 | const history = createBrowserHistory(); 10 | const router = routerMiddleware(history); 11 | const enhancer = applyMiddleware(thunk, router); 12 | 13 | function configureStore(initialState?: counterStateType) { 14 | return createStore(rootReducer, initialState, enhancer); 15 | } 16 | 17 | export default { configureStore, history }; 18 | -------------------------------------------------------------------------------- /app/components/Counter.css: -------------------------------------------------------------------------------- 1 | .backButton { 2 | position: absolute; 3 | } 4 | 5 | .counter { 6 | position: absolute; 7 | top: 30%; 8 | left: 45%; 9 | font-size: 10rem; 10 | font-weight: bold; 11 | letter-spacing: -0.025em; 12 | } 13 | 14 | .btnGroup { 15 | position: relative; 16 | top: 500px; 17 | width: 480px; 18 | margin: 0 auto; 19 | } 20 | 21 | .btn { 22 | font-size: 1.6rem; 23 | font-weight: bold; 24 | background-color: #fff; 25 | border-radius: 50%; 26 | margin: 10px; 27 | width: 100px; 28 | height: 100px; 29 | opacity: 0.7; 30 | cursor: pointer; 31 | font-family: Arial, Helvetica, Helvetica Neue; 32 | } 33 | 34 | .btn:hover { 35 | color: white; 36 | background-color: rgba(0, 0, 0, 0.5); 37 | } 38 | -------------------------------------------------------------------------------- /flow-typed/npm/minimist_v1.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 50bc453586282fb18e63201750049659 2 | // flow-typed version: e6f7626e10/minimist_v1.x.x/flow_>=v0.28.x 3 | 4 | declare module 'minimist' { 5 | declare type minimistOptions = { 6 | string?: string | Array, 7 | boolean?: boolean | string | Array, 8 | alias?: { [arg: string]: string | Array }, 9 | default?: { [arg: string]: any }, 10 | stopEarly?: boolean, 11 | // TODO: Strings as keys don't work... 12 | // '--'? boolean, 13 | unknown?: (param: string) => boolean 14 | }; 15 | 16 | declare type minimistOutput = { 17 | _: Array, 18 | [flag: string]: string | boolean 19 | }; 20 | 21 | declare module.exports: (argv: Array, opts?: minimistOptions) => minimistOutput; 22 | } 23 | -------------------------------------------------------------------------------- /test/reducers/counter.spec.js: -------------------------------------------------------------------------------- 1 | import counter from '../../app/reducers/counter'; 2 | import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../../app/actions/counter'; 3 | 4 | describe('reducers', () => { 5 | describe('counter', () => { 6 | it('should handle initial state', () => { 7 | expect(counter(undefined, {})).toMatchSnapshot(); 8 | }); 9 | 10 | it('should handle INCREMENT_COUNTER', () => { 11 | expect(counter(1, { type: INCREMENT_COUNTER })).toMatchSnapshot(); 12 | }); 13 | 14 | it('should handle DECREMENT_COUNTER', () => { 15 | expect(counter(1, { type: DECREMENT_COUNTER })).toMatchSnapshot(); 16 | }); 17 | 18 | it('should handle unknown action type', () => { 19 | expect(counter(1, { type: 'unknown' })).toMatchSnapshot(); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from 'react-dom'; 3 | import { AppContainer } from 'react-hot-loader'; 4 | import Root from './containers/Root'; 5 | import { configureStore, history } from './store/configureStore'; 6 | import './app.global.css'; 7 | 8 | const store = configureStore(); 9 | 10 | render( 11 | 12 | 13 | , 14 | document.getElementById('root') 15 | ); 16 | 17 | if (module.hot) { 18 | module.hot.accept('./containers/Root', () => { 19 | const NextRoot = require('./containers/Root'); // eslint-disable-line global-require 20 | render( 21 | 22 | 23 | , 24 | document.getElementById('root') 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /internals/scripts/CheckBuiltsExist.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | // Check if the renderer and main bundles are built 3 | import path from 'path'; 4 | import chalk from 'chalk'; 5 | import fs from 'fs'; 6 | 7 | function CheckBuildsExist() { 8 | const mainPath = path.join(__dirname, '..', '..', 'app', 'main.prod.js'); 9 | const rendererPath = path.join(__dirname, '..', '..', 'app', 'dist', 'renderer.prod.js'); 10 | 11 | if (!fs.existsSync(mainPath)) { 12 | throw new Error(chalk.whiteBright.bgRed.bold( 13 | 'The main process is not built yet. Build it by running "npm run build-main"' 14 | )); 15 | } 16 | 17 | if (!fs.existsSync(rendererPath)) { 18 | throw new Error(chalk.whiteBright.bgRed.bold( 19 | 'The renderer process is not built yet. Build it by running "npm run build-renderer"' 20 | )); 21 | } 22 | } 23 | 24 | CheckBuildsExist(); 25 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - 8 7 | - 7 8 | 9 | cache: 10 | yarn: true 11 | directories: 12 | - node_modules 13 | - app/node_modules 14 | 15 | addons: 16 | apt: 17 | sources: 18 | - ubuntu-toolchain-r-test 19 | packages: 20 | - g++-4.8 21 | - icnsutils 22 | - graphicsmagick 23 | - xz-utils 24 | - xorriso 25 | 26 | install: 27 | - export CXX="g++-4.8" 28 | - yarn 29 | - cd app && yarn && cd .. 30 | - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" 31 | 32 | before_script: 33 | - export DISPLAY=:99.0 34 | - sh -e /etc/init.d/xvfb start & 35 | - sleep 3 36 | 37 | script: 38 | - node --version 39 | - yarn lint 40 | - yarn package 41 | - yarn test 42 | - yarn test-e2e 43 | -------------------------------------------------------------------------------- /app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "flowtype/boolean-style": [2, "boolean"], 4 | "flowtype/define-flow-type": 1, 5 | "flowtype/delimiter-dangle": [2, "never"], 6 | "flowtype/generic-spacing": [2, "never"], 7 | "flowtype/no-primitive-constructor-types": 2, 8 | "flowtype/no-weak-types": 1, 9 | "flowtype/object-type-delimiter": [2, "comma"], 10 | "flowtype/require-parameter-type": 0, 11 | "flowtype/require-return-type": 0, 12 | "flowtype/require-valid-file-annotation": 0, 13 | "flowtype/semi": [2, "always"], 14 | "flowtype/space-after-type-colon": [2, "always"], 15 | "flowtype/space-before-generic-bracket": [2, "never"], 16 | "flowtype/space-before-type-colon": [2, "never"], 17 | "flowtype/union-intersection-spacing": [2, "always"], 18 | "flowtype/use-flow-type": 2, 19 | "flowtype/valid-syntax": 2, 20 | "flowtype-errors/show-errors": 2 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/actions/counter.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { counterStateType } from '../reducers/counter'; 3 | 4 | type actionType = { 5 | +type: string 6 | }; 7 | 8 | export const INCREMENT_COUNTER = 'INCREMENT_COUNTER'; 9 | export const DECREMENT_COUNTER = 'DECREMENT_COUNTER'; 10 | 11 | export function increment() { 12 | return { 13 | type: INCREMENT_COUNTER 14 | }; 15 | } 16 | 17 | export function decrement() { 18 | return { 19 | type: DECREMENT_COUNTER 20 | }; 21 | } 22 | 23 | export function incrementIfOdd() { 24 | return (dispatch: (action: actionType) => void, getState: () => counterStateType) => { 25 | const { counter } = getState(); 26 | 27 | if (counter % 2 === 0) { 28 | return; 29 | } 30 | 31 | dispatch(increment()); 32 | }; 33 | } 34 | 35 | export function incrementAsync(delay: number = 1000) { 36 | return (dispatch: (action: actionType) => void) => { 37 | setTimeout(() => { 38 | dispatch(increment()); 39 | }, delay); 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 9513ece6a38cfbf075893a25afcdcf62 2 | // flow-typed version: <>/babel-jest_v^20.0.3/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-jest/build/index.js' { 31 | declare module.exports: $Exports<'babel-jest/build/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/url-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a790a030b49e1fc57a0820d03757464f 2 | // flow-typed version: <>/url-loader_v^0.5.8/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'url-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'url-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'url-loader/index' { 29 | declare module.exports: $Exports<'url-loader'>; 30 | } 31 | declare module 'url-loader/index.js' { 32 | declare module.exports: $Exports<'url-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/file-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 295ae9a957e4a37028392e0540aa3d43 2 | // flow-typed version: <>/file-loader_v^0.11.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'file-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'file-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'file-loader/index' { 29 | declare module.exports: $Exports<'file-loader'>; 30 | } 31 | declare module 'file-loader/index.js' { 32 | declare module.exports: $Exports<'file-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | /node_modules/* 3 | /app/main.prod.js 4 | /app/main.prod.js.map 5 | /app/dist/.* 6 | /resources/.* 7 | /release/.* 8 | /dll/.* 9 | /release/.* 10 | /git/.* 11 | 12 | [include] 13 | 14 | [libs] 15 | 16 | [options] 17 | esproposal.class_static_fields=enable 18 | esproposal.class_instance_fields=enable 19 | esproposal.export_star_as=enable 20 | module.name_mapper.extension='css' -> '/internals/flow/CSSModule.js.flow' 21 | module.name_mapper.extension='styl' -> '/internals/flow/CSSModule.js.flow' 22 | module.name_mapper.extension='scss' -> '/internals/flow/CSSModule.js.flow' 23 | module.name_mapper.extension='png' -> '/internals/flow/WebpackAsset.js.flow' 24 | module.name_mapper.extension='jpg' -> '/internals/flow/WebpackAsset.js.flow' 25 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe 26 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue 27 | -------------------------------------------------------------------------------- /flow-typed/npm/electron-debug_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 58b7d2ce36d31cfa033f2ee1717788fc 2 | // flow-typed version: <>/electron-debug_v^1.2.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'electron-debug' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'electron-debug' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'electron-debug/index' { 29 | declare module.exports: $Exports<'electron-debug'>; 30 | } 31 | declare module 'electron-debug/index.js' { 32 | declare module.exports: $Exports<'electron-debug'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ebb227eb2063cd511833338670db0d5e 2 | // flow-typed version: <>/babel-preset-react_v^6.24.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-react/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-react/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-stage-0_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1dc8e15c75f281dffdace778720e0eab 2 | // flow-typed version: <>/babel-preset-stage-0_v^6.24.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-stage-0' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-stage-0' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-stage-0/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-stage-0/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-stage-0/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babili-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1dc0b13d4d7e5ee4c285b2741863df4b 2 | // flow-typed version: <>/babili-webpack-plugin_v^0.1.2/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babili-webpack-plugin' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babili-webpack-plugin' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babili-webpack-plugin/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babili-webpack-plugin/lib/index.js' { 31 | declare module.exports: $Exports<'babili-webpack-plugin/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | .eslintcache 25 | 26 | # Dependency directory 27 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 28 | node_modules 29 | app/node_modules 30 | 31 | # OSX 32 | .DS_Store 33 | 34 | # flow-typed 35 | flow-typed/npm/* 36 | !flow-typed/npm/module_vx.x.x.js 37 | 38 | # App packaged 39 | release 40 | app/main.prod.js 41 | app/main.prod.js.map 42 | app/renderer.prod.js 43 | app/renderer.prod.js.map 44 | app/style.css 45 | app/style.css.map 46 | dist 47 | dll 48 | main.js 49 | main.js.map 50 | 51 | .idea 52 | npm-debug.log.* 53 | __snapshots__ 54 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-formatter-pretty_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b53256ed2969efa65cf5a334cc66b9cf 2 | // flow-typed version: <>/eslint-formatter-pretty_v^1.1.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-formatter-pretty' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-formatter-pretty' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-formatter-pretty/index' { 29 | declare module.exports: $Exports<'eslint-formatter-pretty'>; 30 | } 31 | declare module 'eslint-formatter-pretty/index.js' { 32 | declare module.exports: $Exports<'eslint-formatter-pretty'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react-optimize_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 70d6f149d6946ae4fb5421c6542e6d0c 2 | // flow-typed version: <>/babel-preset-react-optimize_v^1.0.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react-optimize' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react-optimize' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react-optimize/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-react-optimize/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-react-optimize/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/stylelint-config-standard_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 17a45f3588dc792622110e0f0e073443 2 | // flow-typed version: <>/stylelint-config-standard_v^16.0.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'stylelint-config-standard' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'stylelint-config-standard' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'stylelint-config-standard/index' { 29 | declare module.exports: $Exports<'stylelint-config-standard'>; 30 | } 31 | declare module 'stylelint-config-standard/index.js' { 32 | declare module.exports: $Exports<'stylelint-config-standard'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-dev-expression_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f2af665bef094f35bfb13cee3153f288 2 | // flow-typed version: <>/babel-plugin-dev-expression_v^0.2.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-dev-expression' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-dev-expression' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-dev-expression/dev-expression' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-dev-expression/dev-expression.js' { 31 | declare module.exports: $Exports<'babel-plugin-dev-expression/dev-expression'>; 32 | } 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-dynamic-import-webpack_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1bf972ccd55b93553ad262ff2be199f1 2 | // flow-typed version: <>/babel-plugin-dynamic-import-webpack_v^1.0.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-dynamic-import-webpack' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-dynamic-import-webpack' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-dynamic-import-webpack/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-dynamic-import-webpack/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-dynamic-import-webpack/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 289f574cd48e3bdda0d110bb28cddce5 2 | // flow-typed version: <>/babel-plugin-transform-class-properties_v^6.24.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-class-properties' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-class-properties' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-class-properties/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-class-properties/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-class-properties/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/react-addons-css-transition-group_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a5d420be59219309de3639554ba77a94 2 | // flow-typed version: 72fd37b4b1/react-addons-css-transition-group_v15.x.x/flow_>=v0.26.x <=v0.52.x 3 | 4 | declare module 'react-addons-css-transition-group' { 5 | declare type ReactCSSTransitionGroupNames = { 6 | enter?: string, 7 | enterActive?: string, 8 | leave?: string, 9 | leaveActive?: string, 10 | appear?: string, 11 | appearActive?: string 12 | }; 13 | declare type Props = { 14 | transitionName: string | ReactCSSTransitionGroupNames, 15 | transitionAppear?: boolean, 16 | transitionEnter?: boolean, 17 | transitionLeave?: boolean, 18 | transitionAppearTimeout?: number, 19 | transitionEnterTimeout?: number, 20 | transitionLeaveTimeout?: number, 21 | }; 22 | declare type DefaultProps = { 23 | transitionAppear: boolean, 24 | transitionEnter: boolean, 25 | transitionLeave: boolean, 26 | } 27 | declare class ReactCSSTransitionGroup extends React$Component { 28 | props: Props; 29 | static defaultProps: DefaultProps; 30 | } 31 | declare module.exports: Class; 32 | } 33 | -------------------------------------------------------------------------------- /webpack.config.base.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Base webpack config used across other specific configs 3 | */ 4 | 5 | import path from 'path'; 6 | import webpack from 'webpack'; 7 | import { dependencies as externals } from './app/package.json'; 8 | 9 | export default { 10 | externals: Object.keys(externals || {}), 11 | 12 | module: { 13 | rules: [{ 14 | test: /\.jsx?$/, 15 | exclude: /node_modules/, 16 | use: { 17 | loader: 'babel-loader', 18 | options: { 19 | cacheDirectory: true 20 | } 21 | } 22 | }] 23 | }, 24 | 25 | output: { 26 | path: path.join(__dirname, 'app'), 27 | filename: 'renderer.dev.js', 28 | // https://github.com/webpack/webpack/issues/1114 29 | libraryTarget: 'commonjs2' 30 | }, 31 | 32 | /** 33 | * Determine the array of extensions that should be used to resolve modules. 34 | */ 35 | resolve: { 36 | extensions: ['.js', '.jsx', '.json'], 37 | modules: [ 38 | path.join(__dirname, 'app'), 39 | 'node_modules', 40 | ], 41 | }, 42 | 43 | plugins: [ 44 | new webpack.DefinePlugin({ 45 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production') 46 | }), 47 | 48 | new webpack.NamedModulesPlugin(), 49 | ], 50 | }; 51 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react-hmre_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e167016cbded1a19992ddbb8c4fee28d 2 | // flow-typed version: <>/babel-preset-react-hmre_v^1.1.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react-hmre' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react-hmre' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react-hmre/test/Test' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-react-hmre/index' { 31 | declare module.exports: $Exports<'babel-preset-react-hmre'>; 32 | } 33 | declare module 'babel-preset-react-hmre/index.js' { 34 | declare module.exports: $Exports<'babel-preset-react-hmre'>; 35 | } 36 | declare module 'babel-preset-react-hmre/test/Test.js' { 37 | declare module.exports: $Exports<'babel-preset-react-hmre/test/Test'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/devtron_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1150e231628b1a1f90041ddae079e4db 2 | // flow-typed version: <>/devtron_v^1.4.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'devtron' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'devtron' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'devtron/api' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'devtron/out/browser-globals' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'devtron/out/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'devtron/api.js' { 39 | declare module.exports: $Exports<'devtron/api'>; 40 | } 41 | declare module 'devtron/out/browser-globals.js' { 42 | declare module.exports: $Exports<'devtron/out/browser-globals'>; 43 | } 44 | declare module 'devtron/out/index.js' { 45 | declare module.exports: $Exports<'devtron/out/index'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-import-resolver-webpack_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: eb39bfe1bad065e20fed8dcdb16d9fec 2 | // flow-typed version: <>/eslint-import-resolver-webpack_v^0.8.3/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-import-resolver-webpack' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-import-resolver-webpack' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-import-resolver-webpack/config' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'eslint-import-resolver-webpack/config.js' { 31 | declare module.exports: $Exports<'eslint-import-resolver-webpack/config'>; 32 | } 33 | declare module 'eslint-import-resolver-webpack/index' { 34 | declare module.exports: $Exports<'eslint-import-resolver-webpack'>; 35 | } 36 | declare module 'eslint-import-resolver-webpack/index.js' { 37 | declare module.exports: $Exports<'eslint-import-resolver-webpack'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-add-module-exports_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5dfd8a238ecbe40da326e334609878b9 2 | // flow-typed version: <>/babel-plugin-add-module-exports_v^0.2.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-add-module-exports' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-add-module-exports' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-add-module-exports/changelog' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-add-module-exports/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'babel-plugin-add-module-exports/changelog.js' { 35 | declare module.exports: $Exports<'babel-plugin-add-module-exports/changelog'>; 36 | } 37 | declare module 'babel-plugin-add-module-exports/lib/index.js' { 38 | declare module.exports: $Exports<'babel-plugin-add-module-exports/lib/index'>; 39 | } 40 | -------------------------------------------------------------------------------- /test/components/__snapshots__/Counter.spec.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Counter component should match exact snapshot 1`] = ` 4 |
5 |
6 |
10 | 14 | 17 | 18 |
19 |
23 | 1 24 |
25 |
28 | 37 | 46 | 53 | 60 |
61 |
62 |
63 | `; 64 | -------------------------------------------------------------------------------- /app/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello Electron React! 6 | 17 | 18 | 19 |
20 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-register_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c698f2c3bbe8092525e936d771a6fd9b 2 | // flow-typed version: <>/babel-register_v^6.24.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-register' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-register' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-register/lib/browser' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-register/lib/cache' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-register/lib/node' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'babel-register/lib/browser.js' { 39 | declare module.exports: $Exports<'babel-register/lib/browser'>; 40 | } 41 | declare module 'babel-register/lib/cache.js' { 42 | declare module.exports: $Exports<'babel-register/lib/cache'>; 43 | } 44 | declare module 'babel-register/lib/node.js' { 45 | declare module.exports: $Exports<'babel-register/lib/node'>; 46 | } 47 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "parserOptions": { 4 | "sourceType": "module", 5 | "allowImportExportEverywhere": true 6 | }, 7 | "extends": "airbnb", 8 | "env": { 9 | "browser": true, 10 | "node": true 11 | }, 12 | "rules": { 13 | "arrow-parens": ["off"], 14 | "compat/compat": "error", 15 | "consistent-return": "off", 16 | "comma-dangle": "off", 17 | "flowtype-errors/show-errors": "error", 18 | "generator-star-spacing": "off", 19 | "import/no-unresolved": "error", 20 | "import/no-extraneous-dependencies": "off", 21 | "no-console": "off", 22 | "no-use-before-define": "off", 23 | "no-multi-assign": "off", 24 | "promise/param-names": "error", 25 | "promise/always-return": "error", 26 | "promise/catch-or-return": "error", 27 | "promise/no-native": "off", 28 | "react/sort-comp": ["error", { 29 | "order": ["type-annotations", "static-methods", "lifecycle", "everything-else", "render"] 30 | }], 31 | "react/jsx-no-bind": "off", 32 | "react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }], 33 | "react/prefer-stateless-function": "off" 34 | }, 35 | "plugins": [ 36 | "flowtype", 37 | "flowtype-errors", 38 | "import", 39 | "promise", 40 | "compat", 41 | "react" 42 | ], 43 | "settings": { 44 | "import/resolver": { 45 | "webpack": { 46 | "config": "webpack.config.eslint.js" 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/components/Counter.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import { Link } from 'react-router-dom'; 4 | import styles from './Counter.css'; 5 | 6 | class Counter extends Component { 7 | props: { 8 | increment: () => void, 9 | incrementIfOdd: () => void, 10 | incrementAsync: () => void, 11 | decrement: () => void, 12 | counter: number 13 | }; 14 | 15 | render() { 16 | const { increment, incrementIfOdd, incrementAsync, decrement, counter } = this.props; 17 | return ( 18 |
19 |
20 | 21 | 22 | 23 |
24 |
25 | {counter} 26 |
27 |
28 | 31 | 34 | 35 | 36 |
37 |
38 | ); 39 | } 40 | } 41 | 42 | export default Counter; 43 | -------------------------------------------------------------------------------- /test/actions/counter.spec.js: -------------------------------------------------------------------------------- 1 | import { spy } from 'sinon'; 2 | import * as actions from '../../app/actions/counter'; 3 | 4 | describe('actions', () => { 5 | it('should increment should create increment action', () => { 6 | expect(actions.increment()).toMatchSnapshot(); 7 | }); 8 | 9 | it('should decrement should create decrement action', () => { 10 | expect(actions.decrement()).toMatchSnapshot(); 11 | }); 12 | 13 | it('should incrementIfOdd should create increment action', () => { 14 | const fn = actions.incrementIfOdd(); 15 | expect(fn).toBeInstanceOf(Function); 16 | const dispatch = spy(); 17 | const getState = () => ({ counter: 1 }); 18 | fn(dispatch, getState); 19 | expect(dispatch.calledWith({ type: actions.INCREMENT_COUNTER })).toBe(true); 20 | }); 21 | 22 | it('should incrementIfOdd shouldnt create increment action if counter is even', () => { 23 | const fn = actions.incrementIfOdd(); 24 | const dispatch = spy(); 25 | const getState = () => ({ counter: 2 }); 26 | fn(dispatch, getState); 27 | expect(dispatch.called).toBe(false); 28 | }); 29 | 30 | // There's no nice way to test this at the moment... 31 | it('should incrementAsync', done => { 32 | const fn = actions.incrementAsync(1); 33 | expect(fn).toBeInstanceOf(Function); 34 | const dispatch = spy(); 35 | fn(dispatch); 36 | setTimeout(() => { 37 | expect(dispatch.calledWith({ type: actions.INCREMENT_COUNTER })).toBe(true); 38 | done(); 39 | }, 5); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /flow-typed/npm/concurrently_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6895af4ec8dd6240ffd1a92924b9dac1 2 | // flow-typed version: <>/concurrently_v^3.5.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'concurrently' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'concurrently' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'concurrently/src/main' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'concurrently/test/support/signal' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'concurrently/test/test-functional' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'concurrently/test/utils' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'concurrently/src/main.js' { 43 | declare module.exports: $Exports<'concurrently/src/main'>; 44 | } 45 | declare module 'concurrently/test/support/signal.js' { 46 | declare module.exports: $Exports<'concurrently/test/support/signal'>; 47 | } 48 | declare module 'concurrently/test/test-functional.js' { 49 | declare module.exports: $Exports<'concurrently/test/test-functional'>; 50 | } 51 | declare module 'concurrently/test/utils.js' { 52 | declare module.exports: $Exports<'concurrently/test/utils'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/electron_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6cc1f1d59ba88ea7fa0492a01388ad6c 2 | // flow-typed version: <>/electron_v^1.6.10/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'electron' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'electron' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'electron/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'electron/install' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'electron/test/errors' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'electron/test/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'electron/cli.js' { 43 | declare module.exports: $Exports<'electron/cli'>; 44 | } 45 | declare module 'electron/index' { 46 | declare module.exports: $Exports<'electron'>; 47 | } 48 | declare module 'electron/index.js' { 49 | declare module.exports: $Exports<'electron'>; 50 | } 51 | declare module 'electron/install.js' { 52 | declare module.exports: $Exports<'electron/install'>; 53 | } 54 | declare module 'electron/test/errors.js' { 55 | declare module.exports: $Exports<'electron/test/errors'>; 56 | } 57 | declare module 'electron/test/index.js' { 58 | declare module.exports: $Exports<'electron/test/index'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-thunk_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e8cb40d9fd93ad600bd26e6dfaf7ca77 2 | // flow-typed version: <>/redux-thunk_v^2.2.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-thunk' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-thunk' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-thunk/dist/redux-thunk' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-thunk/dist/redux-thunk.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-thunk/es/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-thunk/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-thunk/src/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'redux-thunk/dist/redux-thunk.js' { 47 | declare module.exports: $Exports<'redux-thunk/dist/redux-thunk'>; 48 | } 49 | declare module 'redux-thunk/dist/redux-thunk.min.js' { 50 | declare module.exports: $Exports<'redux-thunk/dist/redux-thunk.min'>; 51 | } 52 | declare module 'redux-thunk/es/index.js' { 53 | declare module.exports: $Exports<'redux-thunk/es/index'>; 54 | } 55 | declare module 'redux-thunk/lib/index.js' { 56 | declare module.exports: $Exports<'redux-thunk/lib/index'>; 57 | } 58 | declare module 'redux-thunk/src/index.js' { 59 | declare module.exports: $Exports<'redux-thunk/src/index'>; 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/cross-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: cdcc2679cb1b35e68c46740f1c534a8e 2 | // flow-typed version: <>/cross-env_v^5.0.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'cross-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'cross-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'cross-env/dist/bin/cross-env-shell' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'cross-env/dist/bin/cross-env' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'cross-env/dist/command' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'cross-env/dist/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'cross-env/dist/variable' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'cross-env/dist/bin/cross-env-shell.js' { 47 | declare module.exports: $Exports<'cross-env/dist/bin/cross-env-shell'>; 48 | } 49 | declare module 'cross-env/dist/bin/cross-env.js' { 50 | declare module.exports: $Exports<'cross-env/dist/bin/cross-env'>; 51 | } 52 | declare module 'cross-env/dist/command.js' { 53 | declare module.exports: $Exports<'cross-env/dist/command'>; 54 | } 55 | declare module 'cross-env/dist/index.js' { 56 | declare module.exports: $Exports<'cross-env/dist/index'>; 57 | } 58 | declare module 'cross-env/dist/variable.js' { 59 | declare module.exports: $Exports<'cross-env/dist/variable'>; 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 50cb4dda82b444ad7f57f7798544a160 2 | // flow-typed version: <>/extract-text-webpack-plugin_v^2.1.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'extract-text-webpack-plugin' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'extract-text-webpack-plugin' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'extract-text-webpack-plugin/ExtractedModule' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'extract-text-webpack-plugin/loader' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'extract-text-webpack-plugin/OrderUndefinedError' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'extract-text-webpack-plugin/ExtractedModule.js' { 39 | declare module.exports: $Exports<'extract-text-webpack-plugin/ExtractedModule'>; 40 | } 41 | declare module 'extract-text-webpack-plugin/index' { 42 | declare module.exports: $Exports<'extract-text-webpack-plugin'>; 43 | } 44 | declare module 'extract-text-webpack-plugin/index.js' { 45 | declare module.exports: $Exports<'extract-text-webpack-plugin'>; 46 | } 47 | declare module 'extract-text-webpack-plugin/loader.js' { 48 | declare module.exports: $Exports<'extract-text-webpack-plugin/loader'>; 49 | } 50 | declare module 'extract-text-webpack-plugin/OrderUndefinedError.js' { 51 | declare module.exports: $Exports<'extract-text-webpack-plugin/OrderUndefinedError'>; 52 | } 53 | -------------------------------------------------------------------------------- /test/containers/CounterPage.spec.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import { Provider } from 'react-redux'; 4 | import { createBrowserHistory } from 'history'; 5 | import { ConnectedRouter } from 'react-router-redux'; 6 | import CounterPage from '../../app/containers/CounterPage'; 7 | import { configureStore } from '../../app/store/configureStore'; 8 | 9 | function setup(initialState) { 10 | const store = configureStore(initialState); 11 | const history = createBrowserHistory(); 12 | const app = mount( 13 | 14 | 15 | 16 | 17 | 18 | ); 19 | return { 20 | app, 21 | buttons: app.find('button'), 22 | p: app.find('.counter') 23 | }; 24 | } 25 | 26 | describe('containers', () => { 27 | describe('App', () => { 28 | it('should display initial count', () => { 29 | const { p } = setup(); 30 | expect(p.text()).toMatch(/^0$/); 31 | }); 32 | 33 | it('should display updated count after increment button click', () => { 34 | const { buttons, p } = setup(); 35 | buttons.at(0).simulate('click'); 36 | expect(p.text()).toMatch(/^1$/); 37 | }); 38 | 39 | it('should display updated count after descrement button click', () => { 40 | const { buttons, p } = setup(); 41 | buttons.at(1).simulate('click'); 42 | expect(p.text()).toMatch(/^-1$/); 43 | }); 44 | 45 | it('shouldnt change if even and if odd button clicked', () => { 46 | const { buttons, p } = setup(); 47 | buttons.at(2).simulate('click'); 48 | expect(p.text()).toMatch(/^0$/); 49 | }); 50 | 51 | it('should change if odd and if odd button clicked', () => { 52 | const { buttons, p } = setup({ counter: 1 }); 53 | buttons.at(2).simulate('click'); 54 | expect(p.text()).toMatch(/^2$/); 55 | }); 56 | }); 57 | }); 58 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-merge_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f46f35f5d06479288b04d056f19971bb 2 | // flow-typed version: <>/webpack-merge_v^4.1.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-merge' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-merge' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-merge/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-merge/lib/join-arrays-smart' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-merge/lib/join-arrays' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-merge/lib/unique' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-merge/lib/unite-rules' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'webpack-merge/lib/index.js' { 47 | declare module.exports: $Exports<'webpack-merge/lib/index'>; 48 | } 49 | declare module 'webpack-merge/lib/join-arrays-smart.js' { 50 | declare module.exports: $Exports<'webpack-merge/lib/join-arrays-smart'>; 51 | } 52 | declare module 'webpack-merge/lib/join-arrays.js' { 53 | declare module.exports: $Exports<'webpack-merge/lib/join-arrays'>; 54 | } 55 | declare module 'webpack-merge/lib/unique.js' { 56 | declare module.exports: $Exports<'webpack-merge/lib/unique'>; 57 | } 58 | declare module 'webpack-merge/lib/unite-rules.js' { 59 | declare module.exports: $Exports<'webpack-merge/lib/unite-rules'>; 60 | } 61 | -------------------------------------------------------------------------------- /webpack.config.main.prod.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Webpack config for production electron main process 3 | */ 4 | 5 | import webpack from 'webpack'; 6 | import merge from 'webpack-merge'; 7 | import BabiliPlugin from 'babili-webpack-plugin'; 8 | import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; 9 | import baseConfig from './webpack.config.base'; 10 | import CheckNodeEnv from './internals/scripts/CheckNodeEnv'; 11 | 12 | CheckNodeEnv('production'); 13 | 14 | export default merge.smart(baseConfig, { 15 | devtool: 'source-map', 16 | 17 | target: 'electron-main', 18 | 19 | entry: './app/main.dev', 20 | 21 | // 'main.js' in root 22 | output: { 23 | path: __dirname, 24 | filename: './app/main.prod.js' 25 | }, 26 | 27 | plugins: [ 28 | /** 29 | * Babli is an ES6+ aware minifier based on the Babel toolchain (beta) 30 | */ 31 | new BabiliPlugin(), 32 | 33 | new BundleAnalyzerPlugin({ 34 | analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled', 35 | openAnalyzer: process.env.OPEN_ANALYZER === 'true' 36 | }), 37 | 38 | /** 39 | * Create global constants which can be configured at compile time. 40 | * 41 | * Useful for allowing different behaviour between development builds and 42 | * release builds 43 | * 44 | * NODE_ENV should be production so that modules do not perform certain 45 | * development checks 46 | */ 47 | new webpack.DefinePlugin({ 48 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'), 49 | 'process.env.DEBUG_PROD': JSON.stringify(process.env.DEBUG_PROD || 'false') 50 | }) 51 | ], 52 | 53 | /** 54 | * Disables webpack processing of __dirname and __filename. 55 | * If you run the bundle in node.js it falls back to these values of node.js. 56 | * https://github.com/webpack/webpack/issues/2010 57 | */ 58 | node: { 59 | __dirname: false, 60 | __filename: false 61 | }, 62 | }); 63 | -------------------------------------------------------------------------------- /flow-typed/npm/source-map-support_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b874e13f8c3974d47fe0b29adecabcb9 2 | // flow-typed version: <>/source-map-support_v^0.4.15/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'source-map-support' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'source-map-support' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'source-map-support/browser-source-map-support' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'source-map-support/build' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'source-map-support/register' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'source-map-support/source-map-support' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'source-map-support/test' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'source-map-support/browser-source-map-support.js' { 47 | declare module.exports: $Exports<'source-map-support/browser-source-map-support'>; 48 | } 49 | declare module 'source-map-support/build.js' { 50 | declare module.exports: $Exports<'source-map-support/build'>; 51 | } 52 | declare module 'source-map-support/register.js' { 53 | declare module.exports: $Exports<'source-map-support/register'>; 54 | } 55 | declare module 'source-map-support/source-map-support.js' { 56 | declare module.exports: $Exports<'source-map-support/source-map-support'>; 57 | } 58 | declare module 'source-map-support/test.js' { 59 | declare module.exports: $Exports<'source-map-support/test'>; 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/html-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7cf36ced2cdac01ca486158f70c9f16e 2 | // flow-typed version: <>/html-webpack-plugin_v^2.29.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'html-webpack-plugin' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'html-webpack-plugin' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'html-webpack-plugin/lib/chunksorter' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'html-webpack-plugin/lib/compiler' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'html-webpack-plugin/lib/errors' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'html-webpack-plugin/lib/loader' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'html-webpack-plugin/index' { 43 | declare module.exports: $Exports<'html-webpack-plugin'>; 44 | } 45 | declare module 'html-webpack-plugin/index.js' { 46 | declare module.exports: $Exports<'html-webpack-plugin'>; 47 | } 48 | declare module 'html-webpack-plugin/lib/chunksorter.js' { 49 | declare module.exports: $Exports<'html-webpack-plugin/lib/chunksorter'>; 50 | } 51 | declare module 'html-webpack-plugin/lib/compiler.js' { 52 | declare module.exports: $Exports<'html-webpack-plugin/lib/compiler'>; 53 | } 54 | declare module 'html-webpack-plugin/lib/errors.js' { 55 | declare module.exports: $Exports<'html-webpack-plugin/lib/errors'>; 56 | } 57 | declare module 'html-webpack-plugin/lib/loader.js' { 58 | declare module.exports: $Exports<'html-webpack-plugin/lib/loader'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/style-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 60867d4c2562c67fe7b337950534efe6 2 | // flow-typed version: <>/style-loader_v^0.18.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'style-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'style-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'style-loader/lib/addStyles' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'style-loader/lib/addStyleUrl' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'style-loader/lib/urls' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'style-loader/url' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'style-loader/useable' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'style-loader/index' { 47 | declare module.exports: $Exports<'style-loader'>; 48 | } 49 | declare module 'style-loader/index.js' { 50 | declare module.exports: $Exports<'style-loader'>; 51 | } 52 | declare module 'style-loader/lib/addStyles.js' { 53 | declare module.exports: $Exports<'style-loader/lib/addStyles'>; 54 | } 55 | declare module 'style-loader/lib/addStyleUrl.js' { 56 | declare module.exports: $Exports<'style-loader/lib/addStyleUrl'>; 57 | } 58 | declare module 'style-loader/lib/urls.js' { 59 | declare module.exports: $Exports<'style-loader/lib/urls'>; 60 | } 61 | declare module 'style-loader/url.js' { 62 | declare module.exports: $Exports<'style-loader/url'>; 63 | } 64 | declare module 'style-loader/useable.js' { 65 | declare module.exports: $Exports<'style-loader/useable'>; 66 | } 67 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-es2015-classes_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 93169b71e86fea98a223b7b88f809538 2 | // flow-typed version: <>/babel-plugin-transform-es2015-classes_v^6.24.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-es2015-classes' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-es2015-classes' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-es2015-classes/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-transform-es2015-classes/lib/lib/memoise-decorators' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-plugin-transform-es2015-classes/lib/loose' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-plugin-transform-es2015-classes/lib/vanilla' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'babel-plugin-transform-es2015-classes/lib/index.js' { 43 | declare module.exports: $Exports<'babel-plugin-transform-es2015-classes/lib/index'>; 44 | } 45 | declare module 'babel-plugin-transform-es2015-classes/lib/lib/memoise-decorators.js' { 46 | declare module.exports: $Exports<'babel-plugin-transform-es2015-classes/lib/lib/memoise-decorators'>; 47 | } 48 | declare module 'babel-plugin-transform-es2015-classes/lib/loose.js' { 49 | declare module.exports: $Exports<'babel-plugin-transform-es2015-classes/lib/loose'>; 50 | } 51 | declare module 'babel-plugin-transform-es2015-classes/lib/vanilla.js' { 52 | declare module.exports: $Exports<'babel-plugin-transform-es2015-classes/lib/vanilla'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-logger_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 63631368f017cd0c59218715b1d0119d 2 | // flow-typed version: <>/redux-logger_v^3.0.6/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-logger' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-logger' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-logger/dist/redux-logger' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-logger/src/core' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-logger/src/defaults' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-logger/src/diff' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-logger/src/helpers' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'redux-logger/src/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'redux-logger/dist/redux-logger.js' { 51 | declare module.exports: $Exports<'redux-logger/dist/redux-logger'>; 52 | } 53 | declare module 'redux-logger/src/core.js' { 54 | declare module.exports: $Exports<'redux-logger/src/core'>; 55 | } 56 | declare module 'redux-logger/src/defaults.js' { 57 | declare module.exports: $Exports<'redux-logger/src/defaults'>; 58 | } 59 | declare module 'redux-logger/src/diff.js' { 60 | declare module.exports: $Exports<'redux-logger/src/diff'>; 61 | } 62 | declare module 'redux-logger/src/helpers.js' { 63 | declare module.exports: $Exports<'redux-logger/src/helpers'>; 64 | } 65 | declare module 'redux-logger/src/index.js' { 66 | declare module.exports: $Exports<'redux-logger/src/index'>; 67 | } 68 | -------------------------------------------------------------------------------- /app/store/configureStore.dev.js: -------------------------------------------------------------------------------- 1 | import { createStore, applyMiddleware, compose } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import { createHashHistory } from 'history'; 4 | import { routerMiddleware, routerActions } from 'react-router-redux'; 5 | import { createLogger } from 'redux-logger'; 6 | import rootReducer from '../reducers'; 7 | import * as counterActions from '../actions/counter'; 8 | import type { counterStateType } from '../reducers/counter'; 9 | 10 | const history = createHashHistory(); 11 | 12 | const configureStore = (initialState?: counterStateType) => { 13 | // Redux Configuration 14 | const middleware = []; 15 | const enhancers = []; 16 | 17 | // Thunk Middleware 18 | middleware.push(thunk); 19 | 20 | // Logging Middleware 21 | const logger = createLogger({ 22 | level: 'info', 23 | collapsed: true 24 | }); 25 | middleware.push(logger); 26 | 27 | // Router Middleware 28 | const router = routerMiddleware(history); 29 | middleware.push(router); 30 | 31 | // Redux DevTools Configuration 32 | const actionCreators = { 33 | ...counterActions, 34 | ...routerActions, 35 | }; 36 | // If Redux DevTools Extension is installed use it, otherwise use Redux compose 37 | /* eslint-disable no-underscore-dangle */ 38 | const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ 39 | ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ 40 | // Options: http://zalmoxisus.github.io/redux-devtools-extension/API/Arguments.html 41 | actionCreators, 42 | }) 43 | : compose; 44 | /* eslint-enable no-underscore-dangle */ 45 | 46 | // Apply Middleware & Compose Enhancers 47 | enhancers.push(applyMiddleware(...middleware)); 48 | const enhancer = composeEnhancers(...enhancers); 49 | 50 | // Create Store 51 | const store = createStore(rootReducer, initialState, enhancer); 52 | 53 | if (module.hot) { 54 | module.hot.accept('../reducers', () => 55 | store.replaceReducer(require('../reducers')) // eslint-disable-line global-require 56 | ); 57 | } 58 | 59 | return store; 60 | }; 61 | 62 | export default { configureStore, history }; 63 | -------------------------------------------------------------------------------- /test/components/Counter.spec.js: -------------------------------------------------------------------------------- 1 | import { spy } from 'sinon'; 2 | import React from 'react'; 3 | import { shallow } from 'enzyme'; 4 | import { BrowserRouter as Router } from 'react-router-dom'; 5 | import renderer from 'react-test-renderer'; 6 | import Counter from '../../app/components/Counter'; 7 | 8 | function setup() { 9 | const actions = { 10 | increment: spy(), 11 | incrementIfOdd: spy(), 12 | incrementAsync: spy(), 13 | decrement: spy() 14 | }; 15 | const component = shallow(); 16 | return { 17 | component, 18 | actions, 19 | buttons: component.find('button'), 20 | p: component.find('.counter') 21 | }; 22 | } 23 | 24 | describe('Counter component', () => { 25 | it('should should display count', () => { 26 | const { p } = setup(); 27 | expect(p.text()).toMatch(/^1$/); 28 | }); 29 | 30 | it('should first button should call increment', () => { 31 | const { buttons, actions } = setup(); 32 | buttons.at(0).simulate('click'); 33 | expect(actions.increment.called).toBe(true); 34 | }); 35 | 36 | it('should match exact snapshot', () => { 37 | const { actions } = setup(); 38 | const tree = renderer 39 | .create( 40 |
41 | 42 | 43 | 44 |
45 | ) 46 | .toJSON(); 47 | 48 | expect(tree).toMatchSnapshot(); 49 | }); 50 | 51 | it('should second button should call decrement', () => { 52 | const { buttons, actions } = setup(); 53 | buttons.at(1).simulate('click'); 54 | expect(actions.decrement.called).toBe(true); 55 | }); 56 | 57 | it('should third button should call incrementIfOdd', () => { 58 | const { buttons, actions } = setup(); 59 | buttons.at(2).simulate('click'); 60 | expect(actions.incrementIfOdd.called).toBe(true); 61 | }); 62 | 63 | it('should fourth button should call incrementAsync', () => { 64 | const { buttons, actions } = setup(); 65 | buttons.at(3).simulate('click'); 66 | expect(actions.incrementAsync.called).toBe(true); 67 | }); 68 | }); 69 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 889906d366c2435fb42071ac21f578e7 2 | // flow-typed version: <>/babel-loader_v^7.1.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-loader/lib/fs-cache' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-loader/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-loader/lib/resolve-rc' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-loader/lib/utils/exists' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-loader/lib/utils/read' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-loader/lib/utils/relative' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-loader/lib/fs-cache.js' { 51 | declare module.exports: $Exports<'babel-loader/lib/fs-cache'>; 52 | } 53 | declare module 'babel-loader/lib/index.js' { 54 | declare module.exports: $Exports<'babel-loader/lib/index'>; 55 | } 56 | declare module 'babel-loader/lib/resolve-rc.js' { 57 | declare module.exports: $Exports<'babel-loader/lib/resolve-rc'>; 58 | } 59 | declare module 'babel-loader/lib/utils/exists.js' { 60 | declare module.exports: $Exports<'babel-loader/lib/utils/exists'>; 61 | } 62 | declare module 'babel-loader/lib/utils/read.js' { 63 | declare module.exports: $Exports<'babel-loader/lib/utils/read'>; 64 | } 65 | declare module 'babel-loader/lib/utils/relative.js' { 66 | declare module.exports: $Exports<'babel-loader/lib/utils/relative'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-flowtype-errors_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b713aaae7d26658e5353fce4e3f81b2a 2 | // flow-typed version: <>/eslint-plugin-flowtype-errors_v^3.3.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-flowtype-errors' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-flowtype-errors' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-flowtype-errors/dist/collect' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-flowtype-errors/dist/filter' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-flowtype-errors/dist/format' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-flowtype-errors/dist/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'eslint-plugin-flowtype-errors/dist/collect.js' { 43 | declare module.exports: $Exports<'eslint-plugin-flowtype-errors/dist/collect'>; 44 | } 45 | declare module 'eslint-plugin-flowtype-errors/dist/filter.js' { 46 | declare module.exports: $Exports<'eslint-plugin-flowtype-errors/dist/filter'>; 47 | } 48 | declare module 'eslint-plugin-flowtype-errors/dist/format.js' { 49 | declare module.exports: $Exports<'eslint-plugin-flowtype-errors/dist/format'>; 50 | } 51 | declare module 'eslint-plugin-flowtype-errors/dist/index.js' { 52 | declare module.exports: $Exports<'eslint-plugin-flowtype-errors/dist/index'>; 53 | } 54 | declare module 'eslint-plugin-flowtype-errors/index' { 55 | declare module.exports: $Exports<'eslint-plugin-flowtype-errors'>; 56 | } 57 | declare module 'eslint-plugin-flowtype-errors/index.js' { 58 | declare module.exports: $Exports<'eslint-plugin-flowtype-errors'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/sass-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0d5750c746940a778f183b2666e6d6c1 2 | // flow-typed version: <>/sass-loader_v^6.0.6/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'sass-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'sass-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'sass-loader/lib/formatSassError' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'sass-loader/lib/importsToResolve' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'sass-loader/lib/loader' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'sass-loader/lib/normalizeOptions' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'sass-loader/lib/proxyCustomImporters' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'sass-loader/lib/webpackImporter' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'sass-loader/lib/formatSassError.js' { 51 | declare module.exports: $Exports<'sass-loader/lib/formatSassError'>; 52 | } 53 | declare module 'sass-loader/lib/importsToResolve.js' { 54 | declare module.exports: $Exports<'sass-loader/lib/importsToResolve'>; 55 | } 56 | declare module 'sass-loader/lib/loader.js' { 57 | declare module.exports: $Exports<'sass-loader/lib/loader'>; 58 | } 59 | declare module 'sass-loader/lib/normalizeOptions.js' { 60 | declare module.exports: $Exports<'sass-loader/lib/normalizeOptions'>; 61 | } 62 | declare module 'sass-loader/lib/proxyCustomImporters.js' { 63 | declare module.exports: $Exports<'sass-loader/lib/proxyCustomImporters'>; 64 | } 65 | declare module 'sass-loader/lib/webpackImporter.js' { 66 | declare module.exports: $Exports<'sass-loader/lib/webpackImporter'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/spectron_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7717b65e90f5b3fef60172e5017dcfb5 2 | // flow-typed version: <>/spectron_v^3.7.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'spectron' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'spectron' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'spectron/lib/accessibility' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'spectron/lib/api' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'spectron/lib/application' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'spectron/lib/chrome-driver' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'spectron/lib/launcher' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'spectron/vendor/axs_testing' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'spectron/index' { 51 | declare module.exports: $Exports<'spectron'>; 52 | } 53 | declare module 'spectron/index.js' { 54 | declare module.exports: $Exports<'spectron'>; 55 | } 56 | declare module 'spectron/lib/accessibility.js' { 57 | declare module.exports: $Exports<'spectron/lib/accessibility'>; 58 | } 59 | declare module 'spectron/lib/api.js' { 60 | declare module.exports: $Exports<'spectron/lib/api'>; 61 | } 62 | declare module 'spectron/lib/application.js' { 63 | declare module.exports: $Exports<'spectron/lib/application'>; 64 | } 65 | declare module 'spectron/lib/chrome-driver.js' { 66 | declare module.exports: $Exports<'spectron/lib/chrome-driver'>; 67 | } 68 | declare module 'spectron/lib/launcher.js' { 69 | declare module.exports: $Exports<'spectron/lib/launcher'>; 70 | } 71 | declare module 'spectron/vendor/axs_testing.js' { 72 | declare module.exports: $Exports<'spectron/vendor/axs_testing'>; 73 | } 74 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Rijn Bian 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | 24 | 25 | The MIT License (MIT) 26 | 27 | Copyright (c) 2015-present C. T. Lin 28 | 29 | Permission is hereby granted, free of charge, to any person obtaining a copy 30 | of this software and associated documentation files (the "Software"), to deal 31 | in the Software without restriction, including without limitation the rights 32 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 33 | copies of the Software, and to permit persons to whom the Software is 34 | furnished to do so, subject to the following conditions: 35 | 36 | The above copyright notice and this permission notice shall be included in all 37 | copies or substantial portions of the Software. 38 | 39 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 40 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 41 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 42 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 43 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 44 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 45 | SOFTWARE. 46 | -------------------------------------------------------------------------------- /flow-typed/npm/react-addons-test-utils_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7472160d3f2bbd92465a51c99d03752e 2 | // flow-typed version: da30fe6876/react-addons-test-utils_v15.x.x/flow_>=v0.25.x 3 | 4 | import React from "react"; 5 | 6 | declare module "react-addons-test-utils" { 7 | declare var Simulate: { 8 | [eventName: string]: (element: Element, eventData?: Object) => void 9 | }; 10 | declare function renderIntoDocument( 11 | instance: React.Element 12 | ): React.Component; 13 | declare function mockComponent( 14 | componentClass: React.ElementType, 15 | mockTagName?: string 16 | ): Object; 17 | declare function isElement(element: React.Element): boolean; 18 | declare function isElementOfType( 19 | element: React.Element, 20 | componentClass: React.ElementType 21 | ): boolean; 22 | declare function isDOMComponent(instance: React.Component): boolean; 23 | declare function isCompositeComponent(instance: React.Component): boolean; 24 | declare function isCompositeComponentWithType( 25 | instance: React.Component, 26 | componentClass: React.ElementType 27 | ): boolean; 28 | declare function findAllInRenderedTree( 29 | tree: React.Component, 30 | test: (child: React.Component) => boolean 31 | ): Array; 32 | declare function scryRenderedDOMComponentsWithClass( 33 | tree: React.Component, 34 | className: string 35 | ): Array; 36 | declare function findRenderedDOMComponentWithClass( 37 | tree: React.Component, 38 | className: string 39 | ): ?Element; 40 | declare function scryRenderedDOMComponentsWithTag( 41 | tree: React.Component, 42 | tagName: string 43 | ): Array; 44 | declare function findRenderedDOMComponentWithTag( 45 | tree: React.Component, 46 | tagName: string 47 | ): ?Element; 48 | declare function scryRenderedComponentsWithType( 49 | tree: React.Component, 50 | componentClass: React.ElementType 51 | ): Array; 52 | declare function findRenderedComponentWithType( 53 | tree: React.Component, 54 | componentClass: React.ElementType 55 | ): ?React.Component; 56 | declare class ReactShallowRender { 57 | render(element: React.Element): void; 58 | getRenderOutput(): React.Element; 59 | } 60 | declare function createRenderer(): ReactShallowRender; 61 | } 62 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme-to-json_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 52065904af7a0c1a16f0e95737f35684 2 | // flow-typed version: <>/enzyme-to-json_v^1.5.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'enzyme-to-json' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'enzyme-to-json' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'enzyme-to-json/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'enzyme-to-json/build/mount' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'enzyme-to-json/build/render' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'enzyme-to-json/build/serializer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'enzyme-to-json/build/shallow' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'enzyme-to-json/build/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'enzyme-to-json/serializer' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'enzyme-to-json/build/index.js' { 55 | declare module.exports: $Exports<'enzyme-to-json/build/index'>; 56 | } 57 | declare module 'enzyme-to-json/build/mount.js' { 58 | declare module.exports: $Exports<'enzyme-to-json/build/mount'>; 59 | } 60 | declare module 'enzyme-to-json/build/render.js' { 61 | declare module.exports: $Exports<'enzyme-to-json/build/render'>; 62 | } 63 | declare module 'enzyme-to-json/build/serializer.js' { 64 | declare module.exports: $Exports<'enzyme-to-json/build/serializer'>; 65 | } 66 | declare module 'enzyme-to-json/build/shallow.js' { 67 | declare module.exports: $Exports<'enzyme-to-json/build/shallow'>; 68 | } 69 | declare module 'enzyme-to-json/build/utils.js' { 70 | declare module.exports: $Exports<'enzyme-to-json/build/utils'>; 71 | } 72 | declare module 'enzyme-to-json/serializer.js' { 73 | declare module.exports: $Exports<'enzyme-to-json/serializer'>; 74 | } 75 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c41166b59942a412914c850c1022f9f0 2 | // flow-typed version: <>/eslint-plugin-jest_v^20.0.3/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-jest/build/rules/no-disabled-tests' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-jest/build/rules/no-focused-tests' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-jest/build/rules/no-identical-title' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-jest/build/rules/types' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-jest/build/rules/valid-expect' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'eslint-plugin-jest/build/index.js' { 51 | declare module.exports: $Exports<'eslint-plugin-jest/build/index'>; 52 | } 53 | declare module 'eslint-plugin-jest/build/rules/no-disabled-tests.js' { 54 | declare module.exports: $Exports<'eslint-plugin-jest/build/rules/no-disabled-tests'>; 55 | } 56 | declare module 'eslint-plugin-jest/build/rules/no-focused-tests.js' { 57 | declare module.exports: $Exports<'eslint-plugin-jest/build/rules/no-focused-tests'>; 58 | } 59 | declare module 'eslint-plugin-jest/build/rules/no-identical-title.js' { 60 | declare module.exports: $Exports<'eslint-plugin-jest/build/rules/no-identical-title'>; 61 | } 62 | declare module 'eslint-plugin-jest/build/rules/types.js' { 63 | declare module.exports: $Exports<'eslint-plugin-jest/build/rules/types'>; 64 | } 65 | declare module 'eslint-plugin-jest/build/rules/valid-expect.js' { 66 | declare module.exports: $Exports<'eslint-plugin-jest/build/rules/valid-expect'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/electron-devtools-installer_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 701cdbaac73f8b707ff42bddcb642cdd 2 | // flow-typed version: <>/electron-devtools-installer_v^2.2.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'electron-devtools-installer' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'electron-devtools-installer' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'electron-devtools-installer/dist/downloadChromeExtension' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'electron-devtools-installer/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'electron-devtools-installer/dist/utils' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'electron-devtools-installer/src/downloadChromeExtension' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'electron-devtools-installer/src/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'electron-devtools-installer/src/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'electron-devtools-installer/dist/downloadChromeExtension.js' { 51 | declare module.exports: $Exports<'electron-devtools-installer/dist/downloadChromeExtension'>; 52 | } 53 | declare module 'electron-devtools-installer/dist/index.js' { 54 | declare module.exports: $Exports<'electron-devtools-installer/dist/index'>; 55 | } 56 | declare module 'electron-devtools-installer/dist/utils.js' { 57 | declare module.exports: $Exports<'electron-devtools-installer/dist/utils'>; 58 | } 59 | declare module 'electron-devtools-installer/src/downloadChromeExtension.js' { 60 | declare module.exports: $Exports<'electron-devtools-installer/src/downloadChromeExtension'>; 61 | } 62 | declare module 'electron-devtools-installer/src/index.js' { 63 | declare module.exports: $Exports<'electron-devtools-installer/src/index'>; 64 | } 65 | declare module 'electron-devtools-installer/src/utils.js' { 66 | declare module.exports: $Exports<'electron-devtools-installer/src/utils'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 216e3488c87bcd849b648fbf5c48e83b 2 | // flow-typed version: <>/eslint-config-airbnb_v^15.0.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-airbnb' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-airbnb' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-airbnb/base' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-airbnb/legacy' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-airbnb/rules/react-a11y' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-airbnb/rules/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-airbnb/test/test-base' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-airbnb/test/test-react-order' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'eslint-config-airbnb/base.js' { 51 | declare module.exports: $Exports<'eslint-config-airbnb/base'>; 52 | } 53 | declare module 'eslint-config-airbnb/index' { 54 | declare module.exports: $Exports<'eslint-config-airbnb'>; 55 | } 56 | declare module 'eslint-config-airbnb/index.js' { 57 | declare module.exports: $Exports<'eslint-config-airbnb'>; 58 | } 59 | declare module 'eslint-config-airbnb/legacy.js' { 60 | declare module.exports: $Exports<'eslint-config-airbnb/legacy'>; 61 | } 62 | declare module 'eslint-config-airbnb/rules/react-a11y.js' { 63 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react-a11y'>; 64 | } 65 | declare module 'eslint-config-airbnb/rules/react.js' { 66 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react'>; 67 | } 68 | declare module 'eslint-config-airbnb/test/test-base.js' { 69 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-base'>; 70 | } 71 | declare module 'eslint-config-airbnb/test/test-react-order.js' { 72 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-react-order'>; 73 | } 74 | -------------------------------------------------------------------------------- /app/main.dev.js: -------------------------------------------------------------------------------- 1 | /* eslint global-require: 1, flowtype-errors/show-errors: 0 */ 2 | 3 | /** 4 | * This module executes inside of electron's main process. You can start 5 | * electron renderer process from here and communicate with the other processes 6 | * through IPC. 7 | * 8 | * When running `npm run build` or `npm run build-main`, this file is compiled to 9 | * `./app/main.prod.js` using webpack. This gives us some performance wins. 10 | * 11 | * @flow 12 | */ 13 | import { app, BrowserWindow } from 'electron'; 14 | import MenuBuilder from './menu'; 15 | 16 | let mainWindow = null; 17 | 18 | if (process.env.NODE_ENV === 'production') { 19 | const sourceMapSupport = require('source-map-support'); 20 | sourceMapSupport.install(); 21 | } 22 | 23 | if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') { 24 | require('electron-debug')(); 25 | const path = require('path'); 26 | const p = path.join(__dirname, '..', 'app', 'node_modules'); 27 | require('module').globalPaths.push(p); 28 | } 29 | 30 | const installExtensions = async () => { 31 | const installer = require('electron-devtools-installer'); 32 | const forceDownload = !!process.env.UPGRADE_EXTENSIONS; 33 | const extensions = [ 34 | 'REACT_DEVELOPER_TOOLS', 35 | 'REDUX_DEVTOOLS' 36 | ]; 37 | 38 | return Promise 39 | .all(extensions.map(name => installer.default(installer[name], forceDownload))) 40 | .catch(console.log); 41 | }; 42 | 43 | 44 | /** 45 | * Add event listeners... 46 | */ 47 | 48 | app.on('window-all-closed', () => { 49 | // Respect the OSX convention of having the application in memory even 50 | // after all windows have been closed 51 | if (process.platform !== 'darwin') { 52 | app.quit(); 53 | } 54 | }); 55 | 56 | 57 | app.on('ready', async () => { 58 | if (process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true') { 59 | await installExtensions(); 60 | } 61 | 62 | mainWindow = new BrowserWindow({ 63 | show: false, 64 | width: 1024, 65 | height: 728 66 | }); 67 | 68 | mainWindow.loadURL(`file://${__dirname}/app.html`); 69 | 70 | // @TODO: Use 'ready-to-show' event 71 | // https://github.com/electron/electron/blob/master/docs/api/browser-window.md#using-ready-to-show-event 72 | mainWindow.webContents.on('did-finish-load', () => { 73 | if (!mainWindow) { 74 | throw new Error('"mainWindow" is not defined'); 75 | } 76 | mainWindow.show(); 77 | mainWindow.focus(); 78 | }); 79 | 80 | mainWindow.on('closed', () => { 81 | mainWindow = null; 82 | }); 83 | 84 | const menuBuilder = new MenuBuilder(mainWindow); 85 | menuBuilder.buildMenu(); 86 | }); 87 | -------------------------------------------------------------------------------- /flow-typed/npm/cross-spawn_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f98424d9e6f537d9c8fd033a3a6230a3 2 | // flow-typed version: <>/cross-spawn_v^5.1.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'cross-spawn' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'cross-spawn' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'cross-spawn/lib/enoent' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'cross-spawn/lib/parse' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'cross-spawn/lib/util/escapeArgument' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'cross-spawn/lib/util/escapeCommand' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'cross-spawn/lib/util/hasEmptyArgumentBug' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'cross-spawn/lib/util/readShebang' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'cross-spawn/lib/util/resolveCommand' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'cross-spawn/index' { 55 | declare module.exports: $Exports<'cross-spawn'>; 56 | } 57 | declare module 'cross-spawn/index.js' { 58 | declare module.exports: $Exports<'cross-spawn'>; 59 | } 60 | declare module 'cross-spawn/lib/enoent.js' { 61 | declare module.exports: $Exports<'cross-spawn/lib/enoent'>; 62 | } 63 | declare module 'cross-spawn/lib/parse.js' { 64 | declare module.exports: $Exports<'cross-spawn/lib/parse'>; 65 | } 66 | declare module 'cross-spawn/lib/util/escapeArgument.js' { 67 | declare module.exports: $Exports<'cross-spawn/lib/util/escapeArgument'>; 68 | } 69 | declare module 'cross-spawn/lib/util/escapeCommand.js' { 70 | declare module.exports: $Exports<'cross-spawn/lib/util/escapeCommand'>; 71 | } 72 | declare module 'cross-spawn/lib/util/hasEmptyArgumentBug.js' { 73 | declare module.exports: $Exports<'cross-spawn/lib/util/hasEmptyArgumentBug'>; 74 | } 75 | declare module 'cross-spawn/lib/util/readShebang.js' { 76 | declare module.exports: $Exports<'cross-spawn/lib/util/readShebang'>; 77 | } 78 | declare module 'cross-spawn/lib/util/resolveCommand.js' { 79 | declare module.exports: $Exports<'cross-spawn/lib/util/resolveCommand'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fb9050b753124adf69b920326736cddb 2 | // flow-typed version: <>/babel-eslint_v^7.2.3/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-eslint' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-eslint' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-eslint/babylon-to-espree/attachComments' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/babylon-to-espree/convertComments' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/babylon-to-espree/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/babylon-to-espree/toAST' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/babylon-to-espree/toToken' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-eslint/babylon-to-espree/toTokens' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'babel-eslint/babylon-to-espree/attachComments.js' { 55 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; 56 | } 57 | declare module 'babel-eslint/babylon-to-espree/convertComments.js' { 58 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertComments'>; 59 | } 60 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { 61 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; 62 | } 63 | declare module 'babel-eslint/babylon-to-espree/index.js' { 64 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/index'>; 65 | } 66 | declare module 'babel-eslint/babylon-to-espree/toAST.js' { 67 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toAST'>; 68 | } 69 | declare module 'babel-eslint/babylon-to-espree/toToken.js' { 70 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toToken'>; 71 | } 72 | declare module 'babel-eslint/babylon-to-espree/toTokens.js' { 73 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toTokens'>; 74 | } 75 | declare module 'babel-eslint/index' { 76 | declare module.exports: $Exports<'babel-eslint'>; 77 | } 78 | declare module 'babel-eslint/index.js' { 79 | declare module.exports: $Exports<'babel-eslint'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/css-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 72e4eaf66ba7b280095ec9619c5c1b97 2 | // flow-typed version: <>/css-loader_v^0.28.3/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'css-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'css-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'css-loader/lib/compile-exports' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'css-loader/lib/createResolver' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'css-loader/lib/css-base' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'css-loader/lib/getImportPrefix' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'css-loader/lib/getLocalIdent' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'css-loader/lib/loader' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'css-loader/lib/localsLoader' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'css-loader/lib/processCss' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'css-loader/locals' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'css-loader/index' { 63 | declare module.exports: $Exports<'css-loader'>; 64 | } 65 | declare module 'css-loader/index.js' { 66 | declare module.exports: $Exports<'css-loader'>; 67 | } 68 | declare module 'css-loader/lib/compile-exports.js' { 69 | declare module.exports: $Exports<'css-loader/lib/compile-exports'>; 70 | } 71 | declare module 'css-loader/lib/createResolver.js' { 72 | declare module.exports: $Exports<'css-loader/lib/createResolver'>; 73 | } 74 | declare module 'css-loader/lib/css-base.js' { 75 | declare module.exports: $Exports<'css-loader/lib/css-base'>; 76 | } 77 | declare module 'css-loader/lib/getImportPrefix.js' { 78 | declare module.exports: $Exports<'css-loader/lib/getImportPrefix'>; 79 | } 80 | declare module 'css-loader/lib/getLocalIdent.js' { 81 | declare module.exports: $Exports<'css-loader/lib/getLocalIdent'>; 82 | } 83 | declare module 'css-loader/lib/loader.js' { 84 | declare module.exports: $Exports<'css-loader/lib/loader'>; 85 | } 86 | declare module 'css-loader/lib/localsLoader.js' { 87 | declare module.exports: $Exports<'css-loader/lib/localsLoader'>; 88 | } 89 | declare module 'css-loader/lib/processCss.js' { 90 | declare module.exports: $Exports<'css-loader/lib/processCss'>; 91 | } 92 | declare module 'css-loader/locals.js' { 93 | declare module.exports: $Exports<'css-loader/locals'>; 94 | } 95 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1d1be50c5690395873430b12fb0c1459 2 | // flow-typed version: <>/babel-preset-env_v^1.5.1/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-env/data/built-in-features' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-preset-env/data/plugin-features' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-preset-env/lib/default-includes' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-preset-env/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-preset-env/lib/module-transformations' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-preset-env/lib/normalize-options' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-preset-env/lib/targets-parser' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-preset-env/lib/utils' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'babel-preset-env/data/built-in-features.js' { 63 | declare module.exports: $Exports<'babel-preset-env/data/built-in-features'>; 64 | } 65 | declare module 'babel-preset-env/data/plugin-features.js' { 66 | declare module.exports: $Exports<'babel-preset-env/data/plugin-features'>; 67 | } 68 | declare module 'babel-preset-env/lib/default-includes.js' { 69 | declare module.exports: $Exports<'babel-preset-env/lib/default-includes'>; 70 | } 71 | declare module 'babel-preset-env/lib/index.js' { 72 | declare module.exports: $Exports<'babel-preset-env/lib/index'>; 73 | } 74 | declare module 'babel-preset-env/lib/module-transformations.js' { 75 | declare module.exports: $Exports<'babel-preset-env/lib/module-transformations'>; 76 | } 77 | declare module 'babel-preset-env/lib/normalize-options.js' { 78 | declare module.exports: $Exports<'babel-preset-env/lib/normalize-options'>; 79 | } 80 | declare module 'babel-preset-env/lib/targets-parser.js' { 81 | declare module.exports: $Exports<'babel-preset-env/lib/targets-parser'>; 82 | } 83 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin.js' { 84 | declare module.exports: $Exports<'babel-preset-env/lib/transform-polyfill-require-plugin'>; 85 | } 86 | declare module 'babel-preset-env/lib/utils.js' { 87 | declare module.exports: $Exports<'babel-preset-env/lib/utils'>; 88 | } 89 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-compat_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7fcac0914c0e70b9c953cac47864ddc3 2 | // flow-typed version: <>/eslint-plugin-compat_v^1.0.4/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-compat' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-compat' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-compat/lib/config/recommended' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-compat/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-compat/lib/Lint' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-compat/lib/LintTypes' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-compat/lib/providers/CanIUseProvider' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-compat/lib/providers/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-compat/lib/providers/KangaxProvider' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-compat/lib/rules/compat' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-compat/lib/Versioning' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'eslint-plugin-compat/lib/config/recommended.js' { 63 | declare module.exports: $Exports<'eslint-plugin-compat/lib/config/recommended'>; 64 | } 65 | declare module 'eslint-plugin-compat/lib/index.js' { 66 | declare module.exports: $Exports<'eslint-plugin-compat/lib/index'>; 67 | } 68 | declare module 'eslint-plugin-compat/lib/Lint.js' { 69 | declare module.exports: $Exports<'eslint-plugin-compat/lib/Lint'>; 70 | } 71 | declare module 'eslint-plugin-compat/lib/LintTypes.js' { 72 | declare module.exports: $Exports<'eslint-plugin-compat/lib/LintTypes'>; 73 | } 74 | declare module 'eslint-plugin-compat/lib/providers/CanIUseProvider.js' { 75 | declare module.exports: $Exports<'eslint-plugin-compat/lib/providers/CanIUseProvider'>; 76 | } 77 | declare module 'eslint-plugin-compat/lib/providers/index.js' { 78 | declare module.exports: $Exports<'eslint-plugin-compat/lib/providers/index'>; 79 | } 80 | declare module 'eslint-plugin-compat/lib/providers/KangaxProvider.js' { 81 | declare module.exports: $Exports<'eslint-plugin-compat/lib/providers/KangaxProvider'>; 82 | } 83 | declare module 'eslint-plugin-compat/lib/rules/compat.js' { 84 | declare module.exports: $Exports<'eslint-plugin-compat/lib/rules/compat'>; 85 | } 86 | declare module 'eslint-plugin-compat/lib/Versioning.js' { 87 | declare module.exports: $Exports<'eslint-plugin-compat/lib/Versioning'>; 88 | } 89 | -------------------------------------------------------------------------------- /flow-typed/npm/fbjs-scripts_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 95048639bfd8aa1b04f8b7a42a045900 2 | // flow-typed version: <>/fbjs-scripts_v^0.8.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'fbjs-scripts' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'fbjs-scripts' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'fbjs-scripts/babel/default-options' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'fbjs-scripts/gulp/check-dependencies' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'fbjs-scripts/gulp/module-map' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'fbjs-scripts/gulp/shared/provides-module' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'fbjs-scripts/gulp/strip-provides-module' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'fbjs-scripts/jest/createCacheKeyFunction' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'fbjs-scripts/jest/environment' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'fbjs-scripts/jest/preprocessor' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'fbjs-scripts/node/check-dev-engines' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'fbjs-scripts/node/check-lib-requires' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'fbjs-scripts/babel/default-options.js' { 67 | declare module.exports: $Exports<'fbjs-scripts/babel/default-options'>; 68 | } 69 | declare module 'fbjs-scripts/gulp/check-dependencies.js' { 70 | declare module.exports: $Exports<'fbjs-scripts/gulp/check-dependencies'>; 71 | } 72 | declare module 'fbjs-scripts/gulp/module-map.js' { 73 | declare module.exports: $Exports<'fbjs-scripts/gulp/module-map'>; 74 | } 75 | declare module 'fbjs-scripts/gulp/shared/provides-module.js' { 76 | declare module.exports: $Exports<'fbjs-scripts/gulp/shared/provides-module'>; 77 | } 78 | declare module 'fbjs-scripts/gulp/strip-provides-module.js' { 79 | declare module.exports: $Exports<'fbjs-scripts/gulp/strip-provides-module'>; 80 | } 81 | declare module 'fbjs-scripts/jest/createCacheKeyFunction.js' { 82 | declare module.exports: $Exports<'fbjs-scripts/jest/createCacheKeyFunction'>; 83 | } 84 | declare module 'fbjs-scripts/jest/environment.js' { 85 | declare module.exports: $Exports<'fbjs-scripts/jest/environment'>; 86 | } 87 | declare module 'fbjs-scripts/jest/preprocessor.js' { 88 | declare module.exports: $Exports<'fbjs-scripts/jest/preprocessor'>; 89 | } 90 | declare module 'fbjs-scripts/node/check-dev-engines.js' { 91 | declare module.exports: $Exports<'fbjs-scripts/node/check-dev-engines'>; 92 | } 93 | declare module 'fbjs-scripts/node/check-lib-requires.js' { 94 | declare module.exports: $Exports<'fbjs-scripts/node/check-lib-requires'>; 95 | } 96 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-redux_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f56e5170377cde7565bfb9843765b7be 2 | // flow-typed version: <>/react-router-redux_v^5.0.0-alpha.6/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-router-redux' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-router-redux' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-router-redux/actions' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-router-redux/ConnectedRouter' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-router-redux/es/actions' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-router-redux/es/ConnectedRouter' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-router-redux/es/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-router-redux/es/middleware' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-router-redux/es/reducer' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-router-redux/middleware' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-router-redux/reducer' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-router-redux/umd/react-router-redux' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-router-redux/umd/react-router-redux.min' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'react-router-redux/actions.js' { 71 | declare module.exports: $Exports<'react-router-redux/actions'>; 72 | } 73 | declare module 'react-router-redux/ConnectedRouter.js' { 74 | declare module.exports: $Exports<'react-router-redux/ConnectedRouter'>; 75 | } 76 | declare module 'react-router-redux/es/actions.js' { 77 | declare module.exports: $Exports<'react-router-redux/es/actions'>; 78 | } 79 | declare module 'react-router-redux/es/ConnectedRouter.js' { 80 | declare module.exports: $Exports<'react-router-redux/es/ConnectedRouter'>; 81 | } 82 | declare module 'react-router-redux/es/index.js' { 83 | declare module.exports: $Exports<'react-router-redux/es/index'>; 84 | } 85 | declare module 'react-router-redux/es/middleware.js' { 86 | declare module.exports: $Exports<'react-router-redux/es/middleware'>; 87 | } 88 | declare module 'react-router-redux/es/reducer.js' { 89 | declare module.exports: $Exports<'react-router-redux/es/reducer'>; 90 | } 91 | declare module 'react-router-redux/index' { 92 | declare module.exports: $Exports<'react-router-redux'>; 93 | } 94 | declare module 'react-router-redux/index.js' { 95 | declare module.exports: $Exports<'react-router-redux'>; 96 | } 97 | declare module 'react-router-redux/middleware.js' { 98 | declare module.exports: $Exports<'react-router-redux/middleware'>; 99 | } 100 | declare module 'react-router-redux/reducer.js' { 101 | declare module.exports: $Exports<'react-router-redux/reducer'>; 102 | } 103 | declare module 'react-router-redux/umd/react-router-redux.js' { 104 | declare module.exports: $Exports<'react-router-redux/umd/react-router-redux'>; 105 | } 106 | declare module 'react-router-redux/umd/react-router-redux.min.js' { 107 | declare module.exports: $Exports<'react-router-redux/umd/react-router-redux.min'>; 108 | } 109 | -------------------------------------------------------------------------------- /test/e2e/e2e.spec.js: -------------------------------------------------------------------------------- 1 | import { Application } from 'spectron'; 2 | import electronPath from 'electron'; 3 | import path from 'path'; 4 | 5 | jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; 6 | 7 | const delay = time => new Promise(resolve => setTimeout(resolve, time)); 8 | 9 | describe('main window', function spec() { 10 | beforeAll(async () => { 11 | this.app = new Application({ 12 | path: electronPath, 13 | args: [path.join(__dirname, '..', '..', 'app')], 14 | }); 15 | 16 | return this.app.start(); 17 | }); 18 | 19 | afterAll(() => { 20 | if (this.app && this.app.isRunning()) { 21 | return this.app.stop(); 22 | } 23 | }); 24 | 25 | const findCounter = () => this.app.client.element('[data-tid="counter"]'); 26 | 27 | const findButtons = async () => { 28 | const { value } = await this.app.client.elements('[data-tclass="btn"]'); 29 | return value.map(btn => btn.ELEMENT); 30 | }; 31 | 32 | it('should open window', async () => { 33 | const { client, browserWindow } = this.app; 34 | 35 | await client.waitUntilWindowLoaded(); 36 | await delay(500); 37 | const title = await browserWindow.getTitle(); 38 | expect(title).toBe('Hello Electron React!'); 39 | }); 40 | 41 | it('should haven\'t any logs in console of main window', async () => { 42 | const { client } = this.app; 43 | const logs = await client.getRenderProcessLogs(); 44 | // Print renderer process logs 45 | logs.forEach(log => { 46 | console.log(log.message); 47 | console.log(log.source); 48 | console.log(log.level); 49 | }); 50 | expect(logs).toHaveLength(0); 51 | }); 52 | 53 | it('should to Counter with click "to Counter" link', async () => { 54 | const { client } = this.app; 55 | 56 | await client.click('[data-tid=container] > a'); 57 | expect(await findCounter().getText()).toBe('0'); 58 | }); 59 | 60 | it('should display updated count after increment button click', async () => { 61 | const { client } = this.app; 62 | 63 | const buttons = await findButtons(); 64 | await client.elementIdClick(buttons[0]); // + 65 | expect(await findCounter().getText()).toBe('1'); 66 | }); 67 | 68 | it('should display updated count after descrement button click', async () => { 69 | const { client } = this.app; 70 | 71 | const buttons = await findButtons(); 72 | await client.elementIdClick(buttons[1]); // - 73 | expect(await findCounter().getText()).toBe('0'); 74 | }); 75 | 76 | it('shouldnt change if even and if odd button clicked', async () => { 77 | const { client } = this.app; 78 | 79 | const buttons = await findButtons(); 80 | await client.elementIdClick(buttons[2]); // odd 81 | expect(await findCounter().getText()).toBe('0'); 82 | }); 83 | 84 | it('should change if odd and if odd button clicked', async () => { 85 | const { client } = this.app; 86 | 87 | const buttons = await findButtons(); 88 | await client.elementIdClick(buttons[0]); // + 89 | await client.elementIdClick(buttons[2]); // odd 90 | expect(await findCounter().getText()).toBe('2'); 91 | }); 92 | 93 | it('should change if async button clicked and a second later', async () => { 94 | const { client } = this.app; 95 | 96 | const buttons = await findButtons(); 97 | await client.elementIdClick(buttons[3]); // async 98 | expect(await findCounter().getText()).toBe('2'); 99 | await delay(1500); 100 | expect(await findCounter().getText()).toBe('3'); 101 | }); 102 | 103 | it('should back to home if back button clicked', async () => { 104 | const { client } = this.app; 105 | await client.element( 106 | '[data-tid="backButton"] > a' 107 | ).click(); 108 | 109 | expect( 110 | await client.isExisting('[data-tid="container"]') 111 | ).toBe(true); 112 | }); 113 | }); 114 | -------------------------------------------------------------------------------- /flow-typed/npm/chalk_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fa51178772ad1f35158cb4238bc3f1eb 2 | // flow-typed version: da30fe6876/chalk_v2.x.x/flow_>=v0.25.x 3 | 4 | type $npm$chalk$StyleElement = { 5 | open: string, 6 | close: string 7 | }; 8 | 9 | type $npm$chalk$Chain = $npm$chalk$Style & ((...text: any[]) => string); 10 | 11 | type $npm$chalk$Style = { 12 | // General 13 | reset: $npm$chalk$Chain, 14 | bold: $npm$chalk$Chain, 15 | dim: $npm$chalk$Chain, 16 | italic: $npm$chalk$Chain, 17 | underline: $npm$chalk$Chain, 18 | inverse: $npm$chalk$Chain, 19 | strikethrough: $npm$chalk$Chain, 20 | 21 | // Text colors 22 | black: $npm$chalk$Chain, 23 | red: $npm$chalk$Chain, 24 | redBright: $npm$chalk$Chain, 25 | green: $npm$chalk$Chain, 26 | greenBright: $npm$chalk$Chain, 27 | yellow: $npm$chalk$Chain, 28 | yellowBright: $npm$chalk$Chain, 29 | blue: $npm$chalk$Chain, 30 | blueBright: $npm$chalk$Chain, 31 | magenta: $npm$chalk$Chain, 32 | magentaBright: $npm$chalk$Chain, 33 | cyan: $npm$chalk$Chain, 34 | cyanBright: $npm$chalk$Chain, 35 | white: $npm$chalk$Chain, 36 | whiteBright: $npm$chalk$Chain, 37 | gray: $npm$chalk$Chain, 38 | grey: $npm$chalk$Chain, 39 | 40 | // Background colors 41 | bgBlack: $npm$chalk$Chain, 42 | bgBlackBright: $npm$chalk$Chain, 43 | bgRed: $npm$chalk$Chain, 44 | bgRedBright: $npm$chalk$Chain, 45 | bgGreen: $npm$chalk$Chain, 46 | bgGreenBright: $npm$chalk$Chain, 47 | bgYellow: $npm$chalk$Chain, 48 | bgYellowBright: $npm$chalk$Chain, 49 | bgBlue: $npm$chalk$Chain, 50 | bgBlueBright: $npm$chalk$Chain, 51 | bgMagenta: $npm$chalk$Chain, 52 | bgMagentaBright: $npm$chalk$Chain, 53 | bgCyan: $npm$chalk$Chain, 54 | bgCyanBright: $npm$chalk$Chain, 55 | bgWhite: $npm$chalk$Chain, 56 | bgWhiteBright: $npm$chalk$Chain 57 | }; 58 | 59 | declare module "chalk" { 60 | declare var enabled: boolean; 61 | declare var supportsColor: boolean; 62 | 63 | // General 64 | declare var reset: $npm$chalk$Chain; 65 | declare var bold: $npm$chalk$Chain; 66 | declare var dim: $npm$chalk$Chain; 67 | declare var italic: $npm$chalk$Chain; 68 | declare var underline: $npm$chalk$Chain; 69 | declare var inverse: $npm$chalk$Chain; 70 | declare var strikethrough: $npm$chalk$Chain; 71 | 72 | // Text colors 73 | declare var black: $npm$chalk$Chain; 74 | declare var red: $npm$chalk$Chain; 75 | declare var redBright: $npm$chalk$Chain; 76 | declare var green: $npm$chalk$Chain; 77 | declare var greenBright: $npm$chalk$Chain; 78 | declare var yellow: $npm$chalk$Chain; 79 | declare var yellowBright: $npm$chalk$Chain; 80 | declare var blue: $npm$chalk$Chain; 81 | declare var blueBright: $npm$chalk$Chain; 82 | declare var magenta: $npm$chalk$Chain; 83 | declare var magentaBright: $npm$chalk$Chain; 84 | declare var cyan: $npm$chalk$Chain; 85 | declare var cyanBright: $npm$chalk$Chain; 86 | declare var white: $npm$chalk$Chain; 87 | declare var whiteBright: $npm$chalk$Chain; 88 | declare var gray: $npm$chalk$Chain; 89 | declare var grey: $npm$chalk$Chain; 90 | 91 | // Background colors 92 | declare var bgBlack: $npm$chalk$Chain; 93 | declare var bgBlackBright: $npm$chalk$Chain; 94 | declare var bgRed: $npm$chalk$Chain; 95 | declare var bgRedBright: $npm$chalk$Chain; 96 | declare var bgGreen: $npm$chalk$Chain; 97 | declare var bgGreenBright: $npm$chalk$Chain; 98 | declare var bgYellow: $npm$chalk$Chain; 99 | declare var bgYellowBright: $npm$chalk$Chain; 100 | declare var bgBlue: $npm$chalk$Chain; 101 | declare var bgBlueBright: $npm$chalk$Chain; 102 | declare var bgMagenta: $npm$chalk$Chain; 103 | declare var bgMagentaBright: $npm$chalk$Chain; 104 | declare var bgCyan: $npm$chalk$Chain; 105 | declare var bgCyanBright: $npm$chalk$Chain; 106 | declare var bgWhite: $npm$chalk$Chain; 107 | declare var bgWhiteBright: $npm$chalk$Chain; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/react-redux_v5.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c0e8d9867aff7576bb7cf63fe60a6af3 2 | // flow-typed version: 83053e4020/react-redux_v5.x.x/flow_>=v0.30.x <=v0.52.x 3 | 4 | import type { Dispatch, Store } from "redux"; 5 | 6 | declare module "react-redux" { 7 | /* 8 | 9 | S = State 10 | A = Action 11 | OP = OwnProps 12 | SP = StateProps 13 | DP = DispatchProps 14 | 15 | */ 16 | 17 | declare type MapStateToProps = ( 18 | state: S, 19 | ownProps: OP 20 | ) => ((state: S, ownProps: OP) => SP) | SP; 21 | 22 | declare type MapDispatchToProps = 23 | | ((dispatch: Dispatch, ownProps: OP) => DP) 24 | | DP; 25 | 26 | declare type MergeProps = ( 27 | stateProps: SP, 28 | dispatchProps: DP, 29 | ownProps: OP 30 | ) => P; 31 | 32 | declare type Context = { store: Store<*, *> }; 33 | 34 | declare type StatelessComponent

= ( 35 | props: P, 36 | context: Context 37 | ) => ?React$Element; 38 | 39 | declare class ConnectedComponent extends React$Component< 40 | void, 41 | OP, 42 | void 43 | > { 44 | static WrappedComponent: Class>, 45 | getWrappedInstance(): React$Component, 46 | static defaultProps: void, 47 | props: OP, 48 | state: void 49 | } 50 | 51 | declare type ConnectedComponentClass = Class< 52 | ConnectedComponent 53 | >; 54 | 55 | declare type Connector = { 56 | ( 57 | component: StatelessComponent

58 | ): ConnectedComponentClass, 59 | ( 60 | component: Class> 61 | ): ConnectedComponentClass 62 | }; 63 | 64 | declare class Provider extends React$Component< 65 | void, 66 | { store: Store, children?: any }, 67 | void 68 | > {} 69 | 70 | declare type ConnectOptions = { 71 | pure?: boolean, 72 | withRef?: boolean 73 | }; 74 | 75 | declare type Null = null | void; 76 | 77 | declare function connect( 78 | ...rest: Array // <= workaround for https://github.com/facebook/flow/issues/2360 79 | ): Connector } & OP>>; 80 | 81 | declare function connect( 82 | mapStateToProps: Null, 83 | mapDispatchToProps: Null, 84 | mergeProps: Null, 85 | options: ConnectOptions 86 | ): Connector } & OP>>; 87 | 88 | declare function connect( 89 | mapStateToProps: MapStateToProps, 90 | mapDispatchToProps: Null, 91 | mergeProps: Null, 92 | options?: ConnectOptions 93 | ): Connector } & OP>>; 94 | 95 | declare function connect( 96 | mapStateToProps: Null, 97 | mapDispatchToProps: MapDispatchToProps, 98 | mergeProps: Null, 99 | options?: ConnectOptions 100 | ): Connector>; 101 | 102 | declare function connect( 103 | mapStateToProps: MapStateToProps, 104 | mapDispatchToProps: MapDispatchToProps, 105 | mergeProps: Null, 106 | options?: ConnectOptions 107 | ): Connector>; 108 | 109 | declare function connect( 110 | mapStateToProps: MapStateToProps, 111 | mapDispatchToProps: Null, 112 | mergeProps: MergeProps, 113 | options?: ConnectOptions 114 | ): Connector; 115 | 116 | declare function connect( 117 | mapStateToProps: MapStateToProps, 118 | mapDispatchToProps: MapDispatchToProps, 119 | mergeProps: MergeProps, 120 | options?: ConnectOptions 121 | ): Connector; 122 | } 123 | -------------------------------------------------------------------------------- /flow-typed/npm/redux_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e0393883da9eb99c94c51c728b3f1d71 2 | // flow-typed version: 2c04631d20/redux_v3.x.x/flow_>=v0.33.x <=v0.54.x 3 | 4 | declare module 'redux' { 5 | 6 | /* 7 | 8 | S = State 9 | A = Action 10 | D = Dispatch 11 | 12 | */ 13 | 14 | declare export type DispatchAPI = (action: A) => A; 15 | declare export type Dispatch }> = DispatchAPI; 16 | 17 | declare export type MiddlewareAPI> = { 18 | dispatch: D; 19 | getState(): S; 20 | }; 21 | 22 | declare export type Store> = { 23 | // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) 24 | dispatch: D; 25 | getState(): S; 26 | subscribe(listener: () => void): () => void; 27 | replaceReducer(nextReducer: Reducer): void 28 | }; 29 | 30 | declare export type Reducer = (state: S, action: A) => S; 31 | 32 | declare export type CombinedReducer = (state: $Shape & {} | void, action: A) => S; 33 | 34 | declare export type Middleware> = 35 | (api: MiddlewareAPI) => 36 | (next: D) => D; 37 | 38 | declare export type StoreCreator> = { 39 | (reducer: Reducer, enhancer?: StoreEnhancer): Store; 40 | (reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 41 | }; 42 | 43 | declare export type StoreEnhancer> = (next: StoreCreator) => StoreCreator; 44 | 45 | declare export function createStore(reducer: Reducer, enhancer?: StoreEnhancer): Store; 46 | declare export function createStore(reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 47 | 48 | declare export function applyMiddleware(...middlewares: Array>): StoreEnhancer; 49 | 50 | declare export type ActionCreator = (...args: Array) => A; 51 | declare export type ActionCreators = { [key: K]: ActionCreator }; 52 | 53 | declare export function bindActionCreators, D: DispatchAPI>(actionCreator: C, dispatch: D): C; 54 | declare export function bindActionCreators, D: DispatchAPI>(actionCreators: C, dispatch: D): C; 55 | 56 | declare export function combineReducers(reducers: O): CombinedReducer<$ObjMap(r: Reducer) => S>, A>; 57 | 58 | declare export function compose(ab: (a: A) => B): (a: A) => B 59 | declare export function compose( 60 | bc: (b: B) => C, 61 | ab: (a: A) => B 62 | ): (a: A) => C 63 | declare export function compose( 64 | cd: (c: C) => D, 65 | bc: (b: B) => C, 66 | ab: (a: A) => B 67 | ): (a: A) => D 68 | declare export function compose( 69 | de: (d: D) => E, 70 | cd: (c: C) => D, 71 | bc: (b: B) => C, 72 | ab: (a: A) => B 73 | ): (a: A) => E 74 | declare export function compose( 75 | ef: (e: E) => F, 76 | de: (d: D) => E, 77 | cd: (c: C) => D, 78 | bc: (b: B) => C, 79 | ab: (a: A) => B 80 | ): (a: A) => F 81 | declare export function compose( 82 | fg: (f: F) => G, 83 | ef: (e: E) => F, 84 | de: (d: D) => E, 85 | cd: (c: C) => D, 86 | bc: (b: B) => C, 87 | ab: (a: A) => B 88 | ): (a: A) => G 89 | declare export function compose( 90 | gh: (g: G) => H, 91 | fg: (f: F) => G, 92 | ef: (e: E) => F, 93 | de: (d: D) => E, 94 | cd: (c: C) => D, 95 | bc: (b: B) => C, 96 | ab: (a: A) => B 97 | ): (a: A) => H 98 | declare export function compose( 99 | hi: (h: H) => I, 100 | gh: (g: G) => H, 101 | fg: (f: F) => G, 102 | ef: (e: E) => F, 103 | de: (d: D) => E, 104 | cd: (c: C) => D, 105 | bc: (b: B) => C, 106 | ab: (a: A) => B 107 | ): (a: A) => I 108 | 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 88e8ce86d46701f2c1717cbba2890283 2 | // flow-typed version: 19506e57e6/react-router_v4.x.x/flow_>=v0.30.x <=v0.52.x 3 | 4 | declare module 'react-router' { 5 | // NOTE: many of these are re-exported by react-router-dom and 6 | // react-router-native, so when making changes, please be sure to update those 7 | // as well. 8 | declare export type Location = { 9 | pathname: string, 10 | search: string, 11 | hash: string, 12 | state?: any, 13 | key?: string, 14 | } 15 | 16 | declare export type LocationShape = { 17 | pathname?: string, 18 | search?: string, 19 | hash?: string, 20 | state?: any, 21 | } 22 | 23 | declare export type HistoryAction = 'PUSH' | 'REPLACE' | 'POP' 24 | 25 | declare export type RouterHistory = { 26 | length: number, 27 | location: Location, 28 | action: HistoryAction, 29 | listen(callback: (location: Location, action: HistoryAction) => void): () => void, 30 | push(path: string | LocationShape, state?: any): void, 31 | replace(path: string | LocationShape, state?: any): void, 32 | go(n: number): void, 33 | goBack(): void, 34 | goForward(): void, 35 | canGo?: (n: number) => bool, 36 | block(callback: (location: Location, action: HistoryAction) => boolean): void, 37 | // createMemoryHistory 38 | index?: number, 39 | entries?: Array, 40 | } 41 | 42 | declare export type Match = { 43 | params: { [key: string]: ?string }, 44 | isExact: boolean, 45 | path: string, 46 | url: string, 47 | } 48 | 49 | declare export type ContextRouter = { 50 | history: RouterHistory, 51 | location: Location, 52 | match: Match, 53 | } 54 | 55 | declare export type GetUserConfirmation = 56 | (message: string, callback: (confirmed: boolean) => void) => void 57 | 58 | declare type StaticRouterContext = { 59 | url?: string, 60 | } 61 | 62 | declare export class StaticRouter extends React$Component { 63 | props: { 64 | basename?: string, 65 | location?: string | Location, 66 | context: StaticRouterContext, 67 | children?: React$Element<*>, 68 | } 69 | } 70 | 71 | declare export class MemoryRouter extends React$Component { 72 | props: { 73 | initialEntries?: Array, 74 | initialIndex?: number, 75 | getUserConfirmation?: GetUserConfirmation, 76 | keyLength?: number, 77 | children?: React$Element<*>, 78 | } 79 | } 80 | 81 | declare export class Router extends React$Component { 82 | props: { 83 | history: RouterHistory, 84 | children?: React$Element<*>, 85 | } 86 | } 87 | 88 | declare export class Prompt extends React$Component { 89 | props: { 90 | message: string | (location: Location) => string | true, 91 | when?: boolean, 92 | } 93 | } 94 | 95 | declare export class Redirect extends React$Component { 96 | props: { 97 | to: string | LocationShape, 98 | push?: boolean, 99 | } 100 | } 101 | 102 | declare export class Route extends React$Component { 103 | props: { 104 | component?: ReactClass<*>, 105 | render?: (router: ContextRouter) => React$Element<*>, 106 | children?: (router: ContextRouter) => React$Element<*>, 107 | path?: string, 108 | exact?: bool, 109 | strict?: bool, 110 | } 111 | } 112 | 113 | declare export class Switch extends React$Component { 114 | props: { 115 | children?: Array>, 116 | } 117 | } 118 | 119 | declare type FunctionComponent

= (props: P) => ?React$Element; 120 | declare type ClassComponent = Class>; 121 | declare export function withRouter(Component: ClassComponent | FunctionComponent

): ClassComponent, S>; 122 | 123 | declare type MatchPathOptions = { 124 | exact?: boolean, 125 | strict?: boolean, 126 | } 127 | declare export function matchPath(pathname: string, path: string, options?: MatchPathOptions): null | Match 128 | } 129 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme_v2.3.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a1fceaefab821f37dbb2f68fae2a79eb 2 | // flow-typed version: d7a8d069fa/enzyme_v2.3.x/flow_>=v0.28.x <=v0.52.x 3 | 4 | declare module "enzyme" { 5 | declare type PredicateFunction = ( 6 | wrapper: T, 7 | index: number 8 | ) => boolean; 9 | declare type NodeOrNodes = React$Element | Array>; 10 | declare type EnzymeSelector = string | ReactClass | Object; 11 | 12 | // CheerioWrapper is a type alias for an actual cheerio instance 13 | // TODO: Reference correct type from cheerio's type declarations 14 | declare type CheerioWrapper = any; 15 | 16 | declare class Wrapper { 17 | find(selector: EnzymeSelector): this, 18 | findWhere(predicate: PredicateFunction): this, 19 | filter(selector: EnzymeSelector): this, 20 | filterWhere(predicate: PredicateFunction): this, 21 | contains(nodeOrNodes: NodeOrNodes): boolean, 22 | containsMatchingElement(node: React$Element): boolean, 23 | containsAllMatchingElements(nodes: NodeOrNodes): boolean, 24 | containsAnyMatchingElements(nodes: NodeOrNodes): boolean, 25 | dive(option?: { context?: Object }): this, 26 | exists(): boolean, 27 | matchesElement(node: React$Element): boolean, 28 | hasClass(className: string): boolean, 29 | is(selector: EnzymeSelector): boolean, 30 | isEmpty(): boolean, 31 | not(selector: EnzymeSelector): this, 32 | children(selector?: EnzymeSelector): this, 33 | childAt(index: number): this, 34 | parents(selector?: EnzymeSelector): this, 35 | parent(): this, 36 | closest(selector: EnzymeSelector): this, 37 | render(): CheerioWrapper, 38 | unmount(): this, 39 | text(): string, 40 | html(): string, 41 | get(index: number): React$Element, 42 | getNode(): React$Element, 43 | getNodes(): Array>, 44 | getDOMNode(): HTMLElement | HTMLInputElement, 45 | at(index: number): this, 46 | first(): this, 47 | last(): this, 48 | state(key?: string): any, 49 | context(key?: string): any, 50 | props(): Object, 51 | prop(key: string): any, 52 | key(): string, 53 | simulate(event: string, ...args: Array): this, 54 | setState(state: {}, callback?: Function): this, 55 | setProps(props: {}): this, 56 | setContext(context: Object): this, 57 | instance(): React$Component<*, *, *>, 58 | update(): this, 59 | debug(): string, 60 | type(): string | Function | null, 61 | name(): string, 62 | forEach(fn: (node: this, index: number) => mixed): this, 63 | map(fn: (node: this, index: number) => T): Array, 64 | reduce( 65 | fn: (value: T, node: this, index: number) => T, 66 | initialValue?: T 67 | ): Array, 68 | reduceRight( 69 | fn: (value: T, node: this, index: number) => T, 70 | initialValue?: T 71 | ): Array, 72 | some(selector: EnzymeSelector): boolean, 73 | someWhere(predicate: PredicateFunction): boolean, 74 | every(selector: EnzymeSelector): boolean, 75 | everyWhere(predicate: PredicateFunction): boolean, 76 | length: number 77 | } 78 | 79 | declare export class ReactWrapper extends Wrapper { 80 | constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper, 81 | mount(): this, 82 | ref(refName: string): this, 83 | detach(): void 84 | } 85 | 86 | declare export class ShallowWrapper extends Wrapper { 87 | equals(node: React$Element): boolean, 88 | shallow(options?: { context?: Object }): ShallowWrapper 89 | } 90 | 91 | declare export function shallow( 92 | node: React$Element, 93 | options?: { context?: Object } 94 | ): ShallowWrapper; 95 | declare export function mount( 96 | node: React$Element, 97 | options?: { 98 | context?: Object, 99 | attachTo?: HTMLElement, 100 | childContextTypes?: Object 101 | } 102 | ): ReactWrapper; 103 | declare export function render( 104 | node: React$Element, 105 | options?: { context?: Object } 106 | ): CheerioWrapper; 107 | } 108 | -------------------------------------------------------------------------------- /flow-typed/npm/react-hot-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 092ed3b24edab092c3c46f0f8b3e855b 2 | // flow-typed version: <>/react-hot-loader_v3.0.0-beta.6/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-hot-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-hot-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-hot-loader/babel' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-hot-loader/lib/AppContainer.dev' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-hot-loader/lib/AppContainer' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-hot-loader/lib/AppContainer.prod' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-hot-loader/lib/babel/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-hot-loader/lib/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-hot-loader/lib/patch.dev' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-hot-loader/lib/patch' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-hot-loader/lib/patch.prod' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-hot-loader/lib/webpack/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-hot-loader/lib/webpack/makeIdentitySourceMap' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-hot-loader/lib/webpack/tagCommonJSExports' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-hot-loader/patch' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-hot-loader/webpack' { 78 | declare module.exports: any; 79 | } 80 | 81 | // Filename aliases 82 | declare module 'react-hot-loader/babel.js' { 83 | declare module.exports: $Exports<'react-hot-loader/babel'>; 84 | } 85 | declare module 'react-hot-loader/index' { 86 | declare module.exports: $Exports<'react-hot-loader'>; 87 | } 88 | declare module 'react-hot-loader/index.js' { 89 | declare module.exports: $Exports<'react-hot-loader'>; 90 | } 91 | declare module 'react-hot-loader/lib/AppContainer.dev.js' { 92 | declare module.exports: $Exports<'react-hot-loader/lib/AppContainer.dev'>; 93 | } 94 | declare module 'react-hot-loader/lib/AppContainer.js' { 95 | declare module.exports: $Exports<'react-hot-loader/lib/AppContainer'>; 96 | } 97 | declare module 'react-hot-loader/lib/AppContainer.prod.js' { 98 | declare module.exports: $Exports<'react-hot-loader/lib/AppContainer.prod'>; 99 | } 100 | declare module 'react-hot-loader/lib/babel/index.js' { 101 | declare module.exports: $Exports<'react-hot-loader/lib/babel/index'>; 102 | } 103 | declare module 'react-hot-loader/lib/index.js' { 104 | declare module.exports: $Exports<'react-hot-loader/lib/index'>; 105 | } 106 | declare module 'react-hot-loader/lib/patch.dev.js' { 107 | declare module.exports: $Exports<'react-hot-loader/lib/patch.dev'>; 108 | } 109 | declare module 'react-hot-loader/lib/patch.js' { 110 | declare module.exports: $Exports<'react-hot-loader/lib/patch'>; 111 | } 112 | declare module 'react-hot-loader/lib/patch.prod.js' { 113 | declare module.exports: $Exports<'react-hot-loader/lib/patch.prod'>; 114 | } 115 | declare module 'react-hot-loader/lib/webpack/index.js' { 116 | declare module.exports: $Exports<'react-hot-loader/lib/webpack/index'>; 117 | } 118 | declare module 'react-hot-loader/lib/webpack/makeIdentitySourceMap.js' { 119 | declare module.exports: $Exports<'react-hot-loader/lib/webpack/makeIdentitySourceMap'>; 120 | } 121 | declare module 'react-hot-loader/lib/webpack/tagCommonJSExports.js' { 122 | declare module.exports: $Exports<'react-hot-loader/lib/webpack/tagCommonJSExports'>; 123 | } 124 | declare module 'react-hot-loader/patch.js' { 125 | declare module.exports: $Exports<'react-hot-loader/patch'>; 126 | } 127 | declare module 'react-hot-loader/webpack.js' { 128 | declare module.exports: $Exports<'react-hot-loader/webpack'>; 129 | } 130 | -------------------------------------------------------------------------------- /flow-typed/npm/history_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b4a0f5a8a4e97db6861c300c77185fc1 2 | // flow-typed version: <>/history_v^4.6.3/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'history' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'history' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'history/createBrowserHistory' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'history/createHashHistory' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'history/createMemoryHistory' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'history/createTransitionManager' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'history/DOMUtils' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'history/es/createBrowserHistory' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'history/es/createHashHistory' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'history/es/createMemoryHistory' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'history/es/createTransitionManager' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'history/es/DOMUtils' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'history/es/index' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'history/es/LocationUtils' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'history/es/PathUtils' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'history/LocationUtils' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'history/PathUtils' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'history/umd/history' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'history/umd/history.min' { 90 | declare module.exports: any; 91 | } 92 | 93 | // Filename aliases 94 | declare module 'history/createBrowserHistory.js' { 95 | declare module.exports: $Exports<'history/createBrowserHistory'>; 96 | } 97 | declare module 'history/createHashHistory.js' { 98 | declare module.exports: $Exports<'history/createHashHistory'>; 99 | } 100 | declare module 'history/createMemoryHistory.js' { 101 | declare module.exports: $Exports<'history/createMemoryHistory'>; 102 | } 103 | declare module 'history/createTransitionManager.js' { 104 | declare module.exports: $Exports<'history/createTransitionManager'>; 105 | } 106 | declare module 'history/DOMUtils.js' { 107 | declare module.exports: $Exports<'history/DOMUtils'>; 108 | } 109 | declare module 'history/es/createBrowserHistory.js' { 110 | declare module.exports: $Exports<'history/es/createBrowserHistory'>; 111 | } 112 | declare module 'history/es/createHashHistory.js' { 113 | declare module.exports: $Exports<'history/es/createHashHistory'>; 114 | } 115 | declare module 'history/es/createMemoryHistory.js' { 116 | declare module.exports: $Exports<'history/es/createMemoryHistory'>; 117 | } 118 | declare module 'history/es/createTransitionManager.js' { 119 | declare module.exports: $Exports<'history/es/createTransitionManager'>; 120 | } 121 | declare module 'history/es/DOMUtils.js' { 122 | declare module.exports: $Exports<'history/es/DOMUtils'>; 123 | } 124 | declare module 'history/es/index.js' { 125 | declare module.exports: $Exports<'history/es/index'>; 126 | } 127 | declare module 'history/es/LocationUtils.js' { 128 | declare module.exports: $Exports<'history/es/LocationUtils'>; 129 | } 130 | declare module 'history/es/PathUtils.js' { 131 | declare module.exports: $Exports<'history/es/PathUtils'>; 132 | } 133 | declare module 'history/index' { 134 | declare module.exports: $Exports<'history'>; 135 | } 136 | declare module 'history/index.js' { 137 | declare module.exports: $Exports<'history'>; 138 | } 139 | declare module 'history/LocationUtils.js' { 140 | declare module.exports: $Exports<'history/LocationUtils'>; 141 | } 142 | declare module 'history/PathUtils.js' { 143 | declare module.exports: $Exports<'history/PathUtils'>; 144 | } 145 | declare module 'history/umd/history.js' { 146 | declare module.exports: $Exports<'history/umd/history'>; 147 | } 148 | declare module 'history/umd/history.min.js' { 149 | declare module.exports: $Exports<'history/umd/history.min'>; 150 | } 151 | -------------------------------------------------------------------------------- /flow-typed/npm/identity-obj-proxy_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e9750a7c7f5e10f5fe011dc5eb43c65d 2 | // flow-typed version: <>/identity-obj-proxy_v^3.0.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'identity-obj-proxy' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'identity-obj-proxy' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'identity-obj-proxy/src/__tests__/import-es6-export-test' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'identity-obj-proxy/src/__tests__/import-es6-import-export-test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'identity-obj-proxy/src/__tests__/import-es6-import-test' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'identity-obj-proxy/src/__tests__/import-vanilla-test' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'identity-obj-proxy/src/__tests__/index-test' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'identity-obj-proxy/src/__tests__/require-es6-export-test' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'identity-obj-proxy/src/__tests__/require-es6-import-export-test' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'identity-obj-proxy/src/__tests__/require-es6-import-test' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'identity-obj-proxy/src/__tests__/require-vanilla-test' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'identity-obj-proxy/src/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'identity-obj-proxy/src/test-redirections/idObjES6Export' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'identity-obj-proxy/src/test-redirections/idObjES6Import' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'identity-obj-proxy/src/test-redirections/idObjES6ImportExport' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'identity-obj-proxy/src/__tests__/import-es6-export-test.js' { 79 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/import-es6-export-test'>; 80 | } 81 | declare module 'identity-obj-proxy/src/__tests__/import-es6-import-export-test.js' { 82 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/import-es6-import-export-test'>; 83 | } 84 | declare module 'identity-obj-proxy/src/__tests__/import-es6-import-test.js' { 85 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/import-es6-import-test'>; 86 | } 87 | declare module 'identity-obj-proxy/src/__tests__/import-vanilla-test.js' { 88 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/import-vanilla-test'>; 89 | } 90 | declare module 'identity-obj-proxy/src/__tests__/index-test.js' { 91 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/index-test'>; 92 | } 93 | declare module 'identity-obj-proxy/src/__tests__/require-es6-export-test.js' { 94 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/require-es6-export-test'>; 95 | } 96 | declare module 'identity-obj-proxy/src/__tests__/require-es6-import-export-test.js' { 97 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/require-es6-import-export-test'>; 98 | } 99 | declare module 'identity-obj-proxy/src/__tests__/require-es6-import-test.js' { 100 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/require-es6-import-test'>; 101 | } 102 | declare module 'identity-obj-proxy/src/__tests__/require-vanilla-test.js' { 103 | declare module.exports: $Exports<'identity-obj-proxy/src/__tests__/require-vanilla-test'>; 104 | } 105 | declare module 'identity-obj-proxy/src/index.js' { 106 | declare module.exports: $Exports<'identity-obj-proxy/src/index'>; 107 | } 108 | declare module 'identity-obj-proxy/src/test-redirections/idObjES6Export.js' { 109 | declare module.exports: $Exports<'identity-obj-proxy/src/test-redirections/idObjES6Export'>; 110 | } 111 | declare module 'identity-obj-proxy/src/test-redirections/idObjES6Import.js' { 112 | declare module.exports: $Exports<'identity-obj-proxy/src/test-redirections/idObjES6Import'>; 113 | } 114 | declare module 'identity-obj-proxy/src/test-redirections/idObjES6ImportExport.js' { 115 | declare module.exports: $Exports<'identity-obj-proxy/src/test-redirections/idObjES6ImportExport'>; 116 | } 117 | -------------------------------------------------------------------------------- /webpack.config.renderer.prod.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Build config for electron renderer process 3 | */ 4 | 5 | import path from 'path'; 6 | import webpack from 'webpack'; 7 | import ExtractTextPlugin from 'extract-text-webpack-plugin'; 8 | import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; 9 | import merge from 'webpack-merge'; 10 | import BabiliPlugin from 'babili-webpack-plugin'; 11 | import baseConfig from './webpack.config.base'; 12 | import CheckNodeEnv from './internals/scripts/CheckNodeEnv'; 13 | 14 | CheckNodeEnv('production'); 15 | 16 | export default merge.smart(baseConfig, { 17 | devtool: 'source-map', 18 | 19 | target: 'electron-renderer', 20 | 21 | entry: './app/index', 22 | 23 | output: { 24 | path: path.join(__dirname, 'app/dist'), 25 | publicPath: '../dist/', 26 | filename: 'renderer.prod.js' 27 | }, 28 | 29 | module: { 30 | rules: [ 31 | // Extract all .global.css to style.css as is 32 | { 33 | test: /\.global\.css$/, 34 | use: ExtractTextPlugin.extract({ 35 | use: 'css-loader', 36 | fallback: 'style-loader', 37 | }) 38 | }, 39 | // Pipe other styles through css modules and append to style.css 40 | { 41 | test: /^((?!\.global).)*\.css$/, 42 | use: ExtractTextPlugin.extract({ 43 | use: { 44 | loader: 'css-loader', 45 | options: { 46 | modules: true, 47 | importLoaders: 1, 48 | localIdentName: '[name]__[local]__[hash:base64:5]', 49 | } 50 | } 51 | }), 52 | }, 53 | // Add SASS support - compile all .global.scss files and pipe it to style.css 54 | { 55 | test: /\.global\.scss$/, 56 | use: ExtractTextPlugin.extract({ 57 | use: [ 58 | { 59 | loader: 'css-loader' 60 | }, 61 | { 62 | loader: 'sass-loader' 63 | } 64 | ], 65 | fallback: 'style-loader', 66 | }) 67 | }, 68 | // Add SASS support - compile all other .scss files and pipe it to style.css 69 | { 70 | test: /^((?!\.global).)*\.scss$/, 71 | use: ExtractTextPlugin.extract({ 72 | use: [{ 73 | loader: 'css-loader', 74 | options: { 75 | modules: true, 76 | importLoaders: 1, 77 | localIdentName: '[name]__[local]__[hash:base64:5]', 78 | } 79 | }, 80 | { 81 | loader: 'sass-loader' 82 | }] 83 | }), 84 | }, 85 | // WOFF Font 86 | { 87 | test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, 88 | use: { 89 | loader: 'url-loader', 90 | options: { 91 | limit: 10000, 92 | mimetype: 'application/font-woff', 93 | } 94 | }, 95 | }, 96 | // WOFF2 Font 97 | { 98 | test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, 99 | use: { 100 | loader: 'url-loader', 101 | options: { 102 | limit: 10000, 103 | mimetype: 'application/font-woff', 104 | } 105 | } 106 | }, 107 | // TTF Font 108 | { 109 | test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, 110 | use: { 111 | loader: 'url-loader', 112 | options: { 113 | limit: 10000, 114 | mimetype: 'application/octet-stream' 115 | } 116 | } 117 | }, 118 | // EOT Font 119 | { 120 | test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, 121 | use: 'file-loader', 122 | }, 123 | // SVG Font 124 | { 125 | test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, 126 | use: { 127 | loader: 'url-loader', 128 | options: { 129 | limit: 10000, 130 | mimetype: 'image/svg+xml', 131 | } 132 | } 133 | }, 134 | // Common Image Formats 135 | { 136 | test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/, 137 | use: 'url-loader', 138 | } 139 | ] 140 | }, 141 | 142 | plugins: [ 143 | /** 144 | * Create global constants which can be configured at compile time. 145 | * 146 | * Useful for allowing different behaviour between development builds and 147 | * release builds 148 | * 149 | * NODE_ENV should be production so that modules do not perform certain 150 | * development checks 151 | */ 152 | new webpack.DefinePlugin({ 153 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production') 154 | }), 155 | 156 | /** 157 | * Babli is an ES6+ aware minifier based on the Babel toolchain (beta) 158 | */ 159 | new BabiliPlugin(), 160 | 161 | new ExtractTextPlugin('style.css'), 162 | 163 | new BundleAnalyzerPlugin({ 164 | analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled', 165 | openAnalyzer: process.env.OPEN_ANALYZER === 'true' 166 | }), 167 | ], 168 | }); 169 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-bundle-analyzer_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c530cc679d7527df7ed9abde675eea41 2 | // flow-typed version: <>/webpack-bundle-analyzer_v^2.8.2/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-bundle-analyzer' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-bundle-analyzer' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-bundle-analyzer/lib/analyzer' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-bundle-analyzer/lib/bin/analyzer' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-bundle-analyzer/lib/BundleAnalyzerPlugin' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-bundle-analyzer/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-bundle-analyzer/lib/Logger' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-bundle-analyzer/lib/parseUtils' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-bundle-analyzer/lib/tree' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-bundle-analyzer/lib/viewer' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-bundle-analyzer/public/viewer' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'webpack-bundle-analyzer/src/analyzer' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'webpack-bundle-analyzer/src/bin/analyzer' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'webpack-bundle-analyzer/src/BundleAnalyzerPlugin' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'webpack-bundle-analyzer/src/index' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'webpack-bundle-analyzer/src/Logger' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'webpack-bundle-analyzer/src/parseUtils' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'webpack-bundle-analyzer/src/tree' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'webpack-bundle-analyzer/src/viewer' { 90 | declare module.exports: any; 91 | } 92 | 93 | // Filename aliases 94 | declare module 'webpack-bundle-analyzer/lib/analyzer.js' { 95 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/analyzer'>; 96 | } 97 | declare module 'webpack-bundle-analyzer/lib/bin/analyzer.js' { 98 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/bin/analyzer'>; 99 | } 100 | declare module 'webpack-bundle-analyzer/lib/BundleAnalyzerPlugin.js' { 101 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/BundleAnalyzerPlugin'>; 102 | } 103 | declare module 'webpack-bundle-analyzer/lib/index.js' { 104 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/index'>; 105 | } 106 | declare module 'webpack-bundle-analyzer/lib/Logger.js' { 107 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/Logger'>; 108 | } 109 | declare module 'webpack-bundle-analyzer/lib/parseUtils.js' { 110 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/parseUtils'>; 111 | } 112 | declare module 'webpack-bundle-analyzer/lib/tree.js' { 113 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/tree'>; 114 | } 115 | declare module 'webpack-bundle-analyzer/lib/viewer.js' { 116 | declare module.exports: $Exports<'webpack-bundle-analyzer/lib/viewer'>; 117 | } 118 | declare module 'webpack-bundle-analyzer/public/viewer.js' { 119 | declare module.exports: $Exports<'webpack-bundle-analyzer/public/viewer'>; 120 | } 121 | declare module 'webpack-bundle-analyzer/src/analyzer.js' { 122 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/analyzer'>; 123 | } 124 | declare module 'webpack-bundle-analyzer/src/bin/analyzer.js' { 125 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/bin/analyzer'>; 126 | } 127 | declare module 'webpack-bundle-analyzer/src/BundleAnalyzerPlugin.js' { 128 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/BundleAnalyzerPlugin'>; 129 | } 130 | declare module 'webpack-bundle-analyzer/src/index.js' { 131 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/index'>; 132 | } 133 | declare module 'webpack-bundle-analyzer/src/Logger.js' { 134 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/Logger'>; 135 | } 136 | declare module 'webpack-bundle-analyzer/src/parseUtils.js' { 137 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/parseUtils'>; 138 | } 139 | declare module 'webpack-bundle-analyzer/src/tree.js' { 140 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/tree'>; 141 | } 142 | declare module 'webpack-bundle-analyzer/src/viewer.js' { 143 | declare module.exports: $Exports<'webpack-bundle-analyzer/src/viewer'>; 144 | } 145 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-dom_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a52ef25660e2172052618e087e7f31b7 2 | // flow-typed version: 37d8964a70/react-router-dom_v4.x.x/flow_>=v0.38.x <=v0.52.x 3 | 4 | declare module 'react-router-dom' { 5 | declare export class BrowserRouter extends React$Component { 6 | props: { 7 | basename?: string, 8 | forceRefresh?: boolean, 9 | getUserConfirmation?: GetUserConfirmation, 10 | keyLength?: number, 11 | children?: React$Element<*>, 12 | } 13 | } 14 | 15 | declare export class HashRouter extends React$Component { 16 | props: { 17 | basename?: string, 18 | getUserConfirmation?: GetUserConfirmation, 19 | hashType?: 'slash' | 'noslash' | 'hashbang', 20 | children?: React$Element<*>, 21 | } 22 | } 23 | 24 | declare export class Link extends React$Component { 25 | props: { 26 | to: string | LocationShape, 27 | replace?: boolean, 28 | children?: React$Element<*>, 29 | } 30 | } 31 | 32 | declare export class NavLink extends React$Component { 33 | props: { 34 | to: string | LocationShape, 35 | activeClassName?: string, 36 | className?: string, 37 | activeStyle?: Object, 38 | style?: Object, 39 | isActive?: (match: Match, location: Location) => boolean, 40 | children?: React$Element<*>, 41 | exact?: bool, 42 | strict?: bool, 43 | } 44 | } 45 | 46 | // NOTE: Below are duplicated from react-router. If updating these, please 47 | // update the react-router and react-router-native types as well. 48 | declare export type Location = { 49 | pathname: string, 50 | search: string, 51 | hash: string, 52 | state?: any, 53 | key?: string, 54 | } 55 | 56 | declare export type LocationShape = { 57 | pathname?: string, 58 | search?: string, 59 | hash?: string, 60 | state?: any, 61 | } 62 | 63 | declare export type HistoryAction = 'PUSH' | 'REPLACE' | 'POP' 64 | 65 | declare export type RouterHistory = { 66 | length: number, 67 | location: Location, 68 | action: HistoryAction, 69 | listen(callback: (location: Location, action: HistoryAction) => void): () => void, 70 | push(path: string | LocationShape, state?: any): void, 71 | replace(path: string | LocationShape, state?: any): void, 72 | go(n: number): void, 73 | goBack(): void, 74 | goForward(): void, 75 | canGo?: (n: number) => bool, 76 | block(callback: (location: Location, action: HistoryAction) => boolean): void, 77 | // createMemoryHistory 78 | index?: number, 79 | entries?: Array, 80 | } 81 | 82 | declare export type Match = { 83 | params: { [key: string]: ?string }, 84 | isExact: boolean, 85 | path: string, 86 | url: string, 87 | } 88 | 89 | declare export type ContextRouter = { 90 | history: RouterHistory, 91 | location: Location, 92 | match: Match, 93 | } 94 | 95 | declare export type GetUserConfirmation = 96 | (message: string, callback: (confirmed: boolean) => void) => void 97 | 98 | declare type StaticRouterContext = { 99 | url?: string, 100 | } 101 | 102 | declare export class StaticRouter extends React$Component { 103 | props: { 104 | basename?: string, 105 | location?: string | Location, 106 | context: StaticRouterContext, 107 | children?: React$Element<*>, 108 | } 109 | } 110 | 111 | declare export class MemoryRouter extends React$Component { 112 | props: { 113 | initialEntries?: Array, 114 | initialIndex?: number, 115 | getUserConfirmation?: GetUserConfirmation, 116 | keyLength?: number, 117 | children?: React$Element<*>, 118 | } 119 | } 120 | 121 | declare export class Router extends React$Component { 122 | props: { 123 | history: RouterHistory, 124 | children?: React$Element<*>, 125 | } 126 | } 127 | 128 | declare export class Prompt extends React$Component { 129 | props: { 130 | message: string | (location: Location) => string | true, 131 | when?: boolean, 132 | } 133 | } 134 | 135 | declare export class Redirect extends React$Component { 136 | props: { 137 | to: string | LocationShape, 138 | push?: boolean, 139 | } 140 | } 141 | 142 | declare export class Route extends React$Component { 143 | props: { 144 | component?: ReactClass<*>, 145 | render?: (router: ContextRouter) => React$Element<*>, 146 | children?: (router: ContextRouter) => React$Element<*>, 147 | path?: string, 148 | exact?: bool, 149 | strict?: bool, 150 | } 151 | } 152 | 153 | declare export class Switch extends React$Component { 154 | props: { 155 | children?: Array>, 156 | } 157 | } 158 | 159 | declare type FunctionComponent

= (props: P) => ?React$Element; 160 | declare type ClassComponent = Class>; 161 | declare export function withRouter(Component: ClassComponent | FunctionComponent

): ClassComponent, S>; 162 | 163 | declare type MatchPathOptions = { 164 | path: ?string, 165 | exact?: boolean, 166 | strict?: boolean, 167 | sensitive?: boolean 168 | }; 169 | 170 | declare export function matchPath(pathname: string, options?: MatchPathOptions | string): null | Match 171 | } 172 | -------------------------------------------------------------------------------- /flow-typed/npm/stylefmt_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7ebd438f591cb1436bc9d2658cdd18ba 2 | // flow-typed version: <>/stylefmt_v^6.0.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'stylefmt' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'stylefmt' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'stylefmt/bin/cli' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'stylefmt/lib/formatAtRuleParams' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'stylefmt/lib/formatAtRules' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'stylefmt/lib/formatColors' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'stylefmt/lib/formatComments' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'stylefmt/lib/formatDecls' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'stylefmt/lib/formatOrder' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'stylefmt/lib/formatRules' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'stylefmt/lib/formatSassVariables' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'stylefmt/lib/formatSelectors' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'stylefmt/lib/formatShorthand' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'stylefmt/lib/formatTransforms' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'stylefmt/lib/formatValues' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'stylefmt/lib/formatZeros' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'stylefmt/lib/getIndent' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'stylefmt/lib/hasBlock' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'stylefmt/lib/hasDecls' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'stylefmt/lib/hasRules' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'stylefmt/lib/params' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'stylefmt/lib/util' { 102 | declare module.exports: any; 103 | } 104 | 105 | // Filename aliases 106 | declare module 'stylefmt/bin/cli.js' { 107 | declare module.exports: $Exports<'stylefmt/bin/cli'>; 108 | } 109 | declare module 'stylefmt/index' { 110 | declare module.exports: $Exports<'stylefmt'>; 111 | } 112 | declare module 'stylefmt/index.js' { 113 | declare module.exports: $Exports<'stylefmt'>; 114 | } 115 | declare module 'stylefmt/lib/formatAtRuleParams.js' { 116 | declare module.exports: $Exports<'stylefmt/lib/formatAtRuleParams'>; 117 | } 118 | declare module 'stylefmt/lib/formatAtRules.js' { 119 | declare module.exports: $Exports<'stylefmt/lib/formatAtRules'>; 120 | } 121 | declare module 'stylefmt/lib/formatColors.js' { 122 | declare module.exports: $Exports<'stylefmt/lib/formatColors'>; 123 | } 124 | declare module 'stylefmt/lib/formatComments.js' { 125 | declare module.exports: $Exports<'stylefmt/lib/formatComments'>; 126 | } 127 | declare module 'stylefmt/lib/formatDecls.js' { 128 | declare module.exports: $Exports<'stylefmt/lib/formatDecls'>; 129 | } 130 | declare module 'stylefmt/lib/formatOrder.js' { 131 | declare module.exports: $Exports<'stylefmt/lib/formatOrder'>; 132 | } 133 | declare module 'stylefmt/lib/formatRules.js' { 134 | declare module.exports: $Exports<'stylefmt/lib/formatRules'>; 135 | } 136 | declare module 'stylefmt/lib/formatSassVariables.js' { 137 | declare module.exports: $Exports<'stylefmt/lib/formatSassVariables'>; 138 | } 139 | declare module 'stylefmt/lib/formatSelectors.js' { 140 | declare module.exports: $Exports<'stylefmt/lib/formatSelectors'>; 141 | } 142 | declare module 'stylefmt/lib/formatShorthand.js' { 143 | declare module.exports: $Exports<'stylefmt/lib/formatShorthand'>; 144 | } 145 | declare module 'stylefmt/lib/formatTransforms.js' { 146 | declare module.exports: $Exports<'stylefmt/lib/formatTransforms'>; 147 | } 148 | declare module 'stylefmt/lib/formatValues.js' { 149 | declare module.exports: $Exports<'stylefmt/lib/formatValues'>; 150 | } 151 | declare module 'stylefmt/lib/formatZeros.js' { 152 | declare module.exports: $Exports<'stylefmt/lib/formatZeros'>; 153 | } 154 | declare module 'stylefmt/lib/getIndent.js' { 155 | declare module.exports: $Exports<'stylefmt/lib/getIndent'>; 156 | } 157 | declare module 'stylefmt/lib/hasBlock.js' { 158 | declare module.exports: $Exports<'stylefmt/lib/hasBlock'>; 159 | } 160 | declare module 'stylefmt/lib/hasDecls.js' { 161 | declare module.exports: $Exports<'stylefmt/lib/hasDecls'>; 162 | } 163 | declare module 'stylefmt/lib/hasRules.js' { 164 | declare module.exports: $Exports<'stylefmt/lib/hasRules'>; 165 | } 166 | declare module 'stylefmt/lib/params.js' { 167 | declare module.exports: $Exports<'stylefmt/lib/params'>; 168 | } 169 | declare module 'stylefmt/lib/util.js' { 170 | declare module.exports: $Exports<'stylefmt/lib/util'>; 171 | } 172 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-dev-server_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 07b9070e4fc600e6603605ab088cdacb 2 | // flow-typed version: <>/webpack-dev-server_v^2.5.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-dev-server' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-dev-server' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-dev-server/bin/webpack-dev-server' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-dev-server/client/index.bundle' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-dev-server/client/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-dev-server/client/live.bundle' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-dev-server/client/live' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-dev-server/client/overlay' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-dev-server/client/socket' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-dev-server/client/sockjs.bundle' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-dev-server/client/sockjs' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'webpack-dev-server/client/web_modules/jquery/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'webpack-dev-server/client/web_modules/jquery/jquery-1.8.1' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'webpack-dev-server/client/webpack.config' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'webpack-dev-server/client/webpack.sockjs.config' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'webpack-dev-server/lib/OptionsValidationError' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'webpack-dev-server/lib/polyfills' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'webpack-dev-server/lib/Server' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'webpack-dev-server/lib/util/addDevServerEntrypoints' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'webpack-dev-server/lib/util/createDomain' { 94 | declare module.exports: any; 95 | } 96 | 97 | // Filename aliases 98 | declare module 'webpack-dev-server/bin/webpack-dev-server.js' { 99 | declare module.exports: $Exports<'webpack-dev-server/bin/webpack-dev-server'>; 100 | } 101 | declare module 'webpack-dev-server/client/index.bundle.js' { 102 | declare module.exports: $Exports<'webpack-dev-server/client/index.bundle'>; 103 | } 104 | declare module 'webpack-dev-server/client/index.js' { 105 | declare module.exports: $Exports<'webpack-dev-server/client/index'>; 106 | } 107 | declare module 'webpack-dev-server/client/live.bundle.js' { 108 | declare module.exports: $Exports<'webpack-dev-server/client/live.bundle'>; 109 | } 110 | declare module 'webpack-dev-server/client/live.js' { 111 | declare module.exports: $Exports<'webpack-dev-server/client/live'>; 112 | } 113 | declare module 'webpack-dev-server/client/overlay.js' { 114 | declare module.exports: $Exports<'webpack-dev-server/client/overlay'>; 115 | } 116 | declare module 'webpack-dev-server/client/socket.js' { 117 | declare module.exports: $Exports<'webpack-dev-server/client/socket'>; 118 | } 119 | declare module 'webpack-dev-server/client/sockjs.bundle.js' { 120 | declare module.exports: $Exports<'webpack-dev-server/client/sockjs.bundle'>; 121 | } 122 | declare module 'webpack-dev-server/client/sockjs.js' { 123 | declare module.exports: $Exports<'webpack-dev-server/client/sockjs'>; 124 | } 125 | declare module 'webpack-dev-server/client/web_modules/jquery/index.js' { 126 | declare module.exports: $Exports<'webpack-dev-server/client/web_modules/jquery/index'>; 127 | } 128 | declare module 'webpack-dev-server/client/web_modules/jquery/jquery-1.8.1.js' { 129 | declare module.exports: $Exports<'webpack-dev-server/client/web_modules/jquery/jquery-1.8.1'>; 130 | } 131 | declare module 'webpack-dev-server/client/webpack.config.js' { 132 | declare module.exports: $Exports<'webpack-dev-server/client/webpack.config'>; 133 | } 134 | declare module 'webpack-dev-server/client/webpack.sockjs.config.js' { 135 | declare module.exports: $Exports<'webpack-dev-server/client/webpack.sockjs.config'>; 136 | } 137 | declare module 'webpack-dev-server/lib/OptionsValidationError.js' { 138 | declare module.exports: $Exports<'webpack-dev-server/lib/OptionsValidationError'>; 139 | } 140 | declare module 'webpack-dev-server/lib/polyfills.js' { 141 | declare module.exports: $Exports<'webpack-dev-server/lib/polyfills'>; 142 | } 143 | declare module 'webpack-dev-server/lib/Server.js' { 144 | declare module.exports: $Exports<'webpack-dev-server/lib/Server'>; 145 | } 146 | declare module 'webpack-dev-server/lib/util/addDevServerEntrypoints.js' { 147 | declare module.exports: $Exports<'webpack-dev-server/lib/util/addDevServerEntrypoints'>; 148 | } 149 | declare module 'webpack-dev-server/lib/util/createDomain.js' { 150 | declare module.exports: $Exports<'webpack-dev-server/lib/util/createDomain'>; 151 | } 152 | -------------------------------------------------------------------------------- /webpack.config.renderer.dev.dll.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Builds the DLL for development electron renderer process 3 | */ 4 | 5 | import webpack from 'webpack'; 6 | import path from 'path'; 7 | import merge from 'webpack-merge'; 8 | import baseConfig from './webpack.config.base'; 9 | import { dependencies } from './package.json'; 10 | import CheckNodeEnv from './internals/scripts/CheckNodeEnv'; 11 | 12 | CheckNodeEnv('development'); 13 | 14 | const dist = path.resolve(process.cwd(), 'dll'); 15 | 16 | export default merge.smart(baseConfig, { 17 | context: process.cwd(), 18 | 19 | devtool: 'eval', 20 | 21 | target: 'electron-renderer', 22 | 23 | externals: ['fsevents', 'crypto-browserify'], 24 | 25 | /** 26 | * @HACK: Copy and pasted from renderer dev config. Consider merging these 27 | * rules into the base config. May cause breaking changes. 28 | */ 29 | module: { 30 | rules: [ 31 | { 32 | test: /\.global\.css$/, 33 | use: [ 34 | { 35 | loader: 'style-loader' 36 | }, 37 | { 38 | loader: 'css-loader', 39 | options: { 40 | sourceMap: true, 41 | }, 42 | } 43 | ] 44 | }, 45 | { 46 | test: /^((?!\.global).)*\.css$/, 47 | use: [ 48 | { 49 | loader: 'style-loader' 50 | }, 51 | { 52 | loader: 'css-loader', 53 | options: { 54 | modules: true, 55 | sourceMap: true, 56 | importLoaders: 1, 57 | localIdentName: '[name]__[local]__[hash:base64:5]', 58 | } 59 | }, 60 | ] 61 | }, 62 | // Add SASS support - compile all .global.scss files and pipe it to style.css 63 | { 64 | test: /\.global\.scss$/, 65 | use: [ 66 | { 67 | loader: 'style-loader' 68 | }, 69 | { 70 | loader: 'css-loader', 71 | options: { 72 | sourceMap: true, 73 | }, 74 | }, 75 | { 76 | loader: 'sass-loader' 77 | } 78 | ] 79 | }, 80 | // Add SASS support - compile all other .scss files and pipe it to style.css 81 | { 82 | test: /^((?!\.global).)*\.scss$/, 83 | use: [ 84 | { 85 | loader: 'style-loader' 86 | }, 87 | { 88 | loader: 'css-loader', 89 | options: { 90 | modules: true, 91 | sourceMap: true, 92 | importLoaders: 1, 93 | localIdentName: '[name]__[local]__[hash:base64:5]', 94 | } 95 | }, 96 | { 97 | loader: 'sass-loader' 98 | } 99 | ] 100 | }, 101 | // WOFF Font 102 | { 103 | test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, 104 | use: { 105 | loader: 'url-loader', 106 | options: { 107 | limit: 10000, 108 | mimetype: 'application/font-woff', 109 | } 110 | }, 111 | }, 112 | // WOFF2 Font 113 | { 114 | test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, 115 | use: { 116 | loader: 'url-loader', 117 | options: { 118 | limit: 10000, 119 | mimetype: 'application/font-woff', 120 | } 121 | } 122 | }, 123 | // TTF Font 124 | { 125 | test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, 126 | use: { 127 | loader: 'url-loader', 128 | options: { 129 | limit: 10000, 130 | mimetype: 'application/octet-stream' 131 | } 132 | } 133 | }, 134 | // EOT Font 135 | { 136 | test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, 137 | use: 'file-loader', 138 | }, 139 | // SVG Font 140 | { 141 | test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, 142 | use: { 143 | loader: 'url-loader', 144 | options: { 145 | limit: 10000, 146 | mimetype: 'image/svg+xml', 147 | } 148 | } 149 | }, 150 | // Common Image Formats 151 | { 152 | test: /\.(?:ico|gif|png|jpg|jpeg|webp)$/, 153 | use: 'url-loader', 154 | } 155 | ] 156 | }, 157 | 158 | resolve: { 159 | modules: [ 160 | 'app', 161 | ], 162 | }, 163 | 164 | entry: { 165 | renderer: ( 166 | Object 167 | .keys(dependencies || {}) 168 | .filter(dependency => dependency !== 'font-awesome') 169 | ) 170 | }, 171 | 172 | output: { 173 | library: 'renderer', 174 | path: dist, 175 | filename: '[name].dev.dll.js', 176 | libraryTarget: 'var' 177 | }, 178 | 179 | plugins: [ 180 | new webpack.DllPlugin({ 181 | path: path.join(dist, '[name].json'), 182 | name: '[name]', 183 | }), 184 | 185 | /** 186 | * Create global constants which can be configured at compile time. 187 | * 188 | * Useful for allowing different behaviour between development builds and 189 | * release builds 190 | * 191 | * NODE_ENV should be production so that modules do not perform certain 192 | * development checks 193 | */ 194 | new webpack.DefinePlugin({ 195 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development') 196 | }), 197 | 198 | new webpack.LoaderOptionsPlugin({ 199 | debug: true, 200 | options: { 201 | context: path.resolve(process.cwd(), 'app'), 202 | output: { 203 | path: path.resolve(process.cwd(), 'dll'), 204 | }, 205 | }, 206 | }) 207 | ], 208 | }); 209 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-promise_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b6cdee81f2887f8c013f91d182f2b249 2 | // flow-typed version: <>/eslint-plugin-promise_v^3.5.0/flow_v0.48.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-promise' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-promise' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-promise/rules/always-return' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-promise/rules/avoid-new' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-promise/rules/catch-or-return' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-promise/rules/lib/has-promise-callback' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-promise/rules/lib/is-callback' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-promise/rules/lib/is-inside-callback' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-promise/rules/lib/is-inside-promise' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-promise/rules/lib/is-named-callback' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-promise/rules/lib/is-promise' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-promise/rules/no-callback-in-promise' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-promise/rules/no-native' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-promise/rules/no-nesting' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-promise/rules/no-promise-in-callback' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-promise/rules/no-return-wrap' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-promise/rules/param-names' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-promise/rules/prefer-await-to-callbacks' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-promise/rules/prefer-await-to-then' { 90 | declare module.exports: any; 91 | } 92 | 93 | // Filename aliases 94 | declare module 'eslint-plugin-promise/index' { 95 | declare module.exports: $Exports<'eslint-plugin-promise'>; 96 | } 97 | declare module 'eslint-plugin-promise/index.js' { 98 | declare module.exports: $Exports<'eslint-plugin-promise'>; 99 | } 100 | declare module 'eslint-plugin-promise/rules/always-return.js' { 101 | declare module.exports: $Exports<'eslint-plugin-promise/rules/always-return'>; 102 | } 103 | declare module 'eslint-plugin-promise/rules/avoid-new.js' { 104 | declare module.exports: $Exports<'eslint-plugin-promise/rules/avoid-new'>; 105 | } 106 | declare module 'eslint-plugin-promise/rules/catch-or-return.js' { 107 | declare module.exports: $Exports<'eslint-plugin-promise/rules/catch-or-return'>; 108 | } 109 | declare module 'eslint-plugin-promise/rules/lib/has-promise-callback.js' { 110 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/has-promise-callback'>; 111 | } 112 | declare module 'eslint-plugin-promise/rules/lib/is-callback.js' { 113 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-callback'>; 114 | } 115 | declare module 'eslint-plugin-promise/rules/lib/is-inside-callback.js' { 116 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-inside-callback'>; 117 | } 118 | declare module 'eslint-plugin-promise/rules/lib/is-inside-promise.js' { 119 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-inside-promise'>; 120 | } 121 | declare module 'eslint-plugin-promise/rules/lib/is-named-callback.js' { 122 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-named-callback'>; 123 | } 124 | declare module 'eslint-plugin-promise/rules/lib/is-promise.js' { 125 | declare module.exports: $Exports<'eslint-plugin-promise/rules/lib/is-promise'>; 126 | } 127 | declare module 'eslint-plugin-promise/rules/no-callback-in-promise.js' { 128 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-callback-in-promise'>; 129 | } 130 | declare module 'eslint-plugin-promise/rules/no-native.js' { 131 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-native'>; 132 | } 133 | declare module 'eslint-plugin-promise/rules/no-nesting.js' { 134 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-nesting'>; 135 | } 136 | declare module 'eslint-plugin-promise/rules/no-promise-in-callback.js' { 137 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-promise-in-callback'>; 138 | } 139 | declare module 'eslint-plugin-promise/rules/no-return-wrap.js' { 140 | declare module.exports: $Exports<'eslint-plugin-promise/rules/no-return-wrap'>; 141 | } 142 | declare module 'eslint-plugin-promise/rules/param-names.js' { 143 | declare module.exports: $Exports<'eslint-plugin-promise/rules/param-names'>; 144 | } 145 | declare module 'eslint-plugin-promise/rules/prefer-await-to-callbacks.js' { 146 | declare module.exports: $Exports<'eslint-plugin-promise/rules/prefer-await-to-callbacks'>; 147 | } 148 | declare module 'eslint-plugin-promise/rules/prefer-await-to-then.js' { 149 | declare module.exports: $Exports<'eslint-plugin-promise/rules/prefer-await-to-then'>; 150 | } 151 | --------------------------------------------------------------------------------