From 7a41433f16f31d0be28b30a51e7704a162a9429d Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Fri, 30 Mar 2018 18:33:20 -0400 Subject: [PATCH] Move electron scripts to their own folder --- package.json | 4 +- src/App.js | 39 +++++++++---------- .../starter.js} | 2 +- .../wait-inferno.js} | 0 src/views/Camera/CameraList.js | 3 ++ src/views/Camera/index.js | 1 + src/views/index.js | 1 + 7 files changed, 27 insertions(+), 23 deletions(-) rename src/{electron-starter.js => electron/starter.js} (96%) rename src/{electron-wait-inferno.js => electron/wait-inferno.js} (100%) create mode 100644 src/views/Camera/CameraList.js create mode 100644 src/views/Camera/index.js diff --git a/package.json b/package.json index 71220be..24c63f8 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "build": "inferno-scripts build", "dist": "npm run build && build", "eject": "inferno-scripts eject", - "electron-start": "node src/electron-wait-inferno", + "electron-start": "node src/electron/wait-inferno", "electron": "electron .", "fix": "eslint --fix src/**/*.js", "lint": "eslint src/**/*.js", @@ -38,5 +38,5 @@ "test": "inferno-scripts test --env=jsdom" }, "homepage": "./", - "main": "src/electron-starter.js" + "main": "src/electron/starter.js" } diff --git a/src/App.js b/src/App.js index 2dc66b9..4389fac 100644 --- a/src/App.js +++ b/src/App.js @@ -1,23 +1,22 @@ -import { version, Component } from 'inferno'; -import { Container, Row } from './components/Grid' +import { version } from 'inferno'; +import { BrowserRouter, Route } from 'inferno-router' +import { Container, Row } from './components/Grid'; -class App extends Component { - render () { - return ( - - -
-

{`Welcome to Inferno ${version}`}

-
-
- -

- To get started, edit src/App.js and save to reload. -

-
-
- ); - } -} +const App = () => ( + + + +
+

{`Welcome to Inferno ${version}`}

+
+
+ +

+ To get started, edit src/App.js and save to reload. +

+
+
+
+); export default App; diff --git a/src/electron-starter.js b/src/electron/starter.js similarity index 96% rename from src/electron-starter.js rename to src/electron/starter.js index 8645a4e..dd1ca12 100644 --- a/src/electron-starter.js +++ b/src/electron/starter.js @@ -20,7 +20,7 @@ app.on('ready', () => { // load the index.html of the app. const startUrl = process.env.ELECTRON_START_URL || url.format({ - pathname: path.join(__dirname, '/../build/index.html'), + pathname: path.join(__dirname, '/../../build/index.html'), protocol: 'file:', slashes: true }); diff --git a/src/electron-wait-inferno.js b/src/electron/wait-inferno.js similarity index 100% rename from src/electron-wait-inferno.js rename to src/electron/wait-inferno.js diff --git a/src/views/Camera/CameraList.js b/src/views/Camera/CameraList.js new file mode 100644 index 0000000..01a014b --- /dev/null +++ b/src/views/Camera/CameraList.js @@ -0,0 +1,3 @@ +export const CameraList = () => { + +} \ No newline at end of file diff --git a/src/views/Camera/index.js b/src/views/Camera/index.js new file mode 100644 index 0000000..6f26a4e --- /dev/null +++ b/src/views/Camera/index.js @@ -0,0 +1 @@ +export * from './CameraList'; \ No newline at end of file diff --git a/src/views/index.js b/src/views/index.js index e69de29..c35fccf 100644 --- a/src/views/index.js +++ b/src/views/index.js @@ -0,0 +1 @@ +export * from './CameraList' \ No newline at end of file