Skip to content

Commit

Permalink
Create packaging tools for electron application
Browse files Browse the repository at this point in the history
- Add dist/web for isolating web content for the app
- Add folders to git ignore
- Initialize app package and split dependencies in package.json
- Adjust paths
- Rename 'src' folder to 'app'
- Update package json scripts and build properties
- Rename 'resources' folder to 'assets' and only pass files that are explicitly required by electron
- Put assets which are not required by electron within the app dir
- Adjust paths and enviornment variables
- Adjust build process, change icons
- Add electron icon maker and add application icons to resources folder
- Fix splash screen
- Add github-page to .gitignore file
  • Loading branch information
davidsmorais committed Sep 23, 2018
1 parent 6341b0a commit a9556ce
Show file tree
Hide file tree
Showing 91 changed files with 3,969 additions and 1,520 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
jsconfig.json
.vscode
dist
dist
github-page
app/node_modules
Binary file added app.asar
Binary file not shown.
Binary file added app/assets/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/App.jsx → app/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import TaskList from '../containers/TaskList';
import Nav from './Nav';
import Header from './Header';

import '!style-loader!css-loader!sass-loader!../../node_modules/grommet/grommet-hpe.min.css';
import '!style-loader!css-loader!sass-loader!../node_modules/grommet/grommet-hpe.min.css';
import '!style-loader!css-loader!sass-loader!./App.scss'; // eslint-disable-line

class Dyna extends Component {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/Header.jsx → app/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable */
import React, { Component } from 'react';
import logo from '../../assets/dynaLogo.png';
import logo from '../../resources/dynaLogo.png';
import Header from 'grommet/components/Header';
import Heading from 'grommet/components/Heading';
import Image from 'grommet/components/Image';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import ReactMde from 'react-mde';
import PropTypes from 'prop-types';
import _ from 'lodash';

import '!style-loader!css-loader!sass-loader!../../node_modules/react-mde/lib/styles/css/react-mde.css'; // eslint-disable-line
import '!style-loader!css-loader!sass-loader!../../node_modules/react-mde/lib/styles/css/react-mde-textarea.css'; // eslint-disable-line
import '!style-loader!css-loader!sass-loader!../../node_modules/react-mde/lib/styles/css/react-mde-toolbar.css'; // eslint-disable-line
import '!style-loader!css-loader!sass-loader!../node_modules/react-mde/lib/styles/css/react-mde.css'; // eslint-disable-line
import '!style-loader!css-loader!sass-loader!../node_modules/react-mde/lib/styles/css/react-mde-textarea.css'; // eslint-disable-line
import '!style-loader!css-loader!sass-loader!../node_modules/react-mde/lib/styles/css/react-mde-toolbar.css'; // eslint-disable-line

class Note extends Component {
render() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nav.jsx → app/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button from 'grommet/components/Button';
import classnames from 'classnames';
import Image from 'grommet/components/Image';
import LabelFilter from './LabelFilter';
import logo from '../../assets/dynaLogoCircle.png';
import logo from '../../resources/dynaLogoCircle.png';

import '!style-loader!css-loader!sass-loader!./Nav.scss'; // eslint-disable-line

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// This link also includes instructions on opting out of this behavior.
/* eslint-disable */
export default function register() {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
if (process.env.NODE_ENV === 'PROD' && 'serviceWorker' in navigator) {
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
navigator.serviceWorker
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 4 additions & 5 deletions src/index.html → app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" type="text/css">
<link rel="apple-touch-icon" sizes="180x180" href="../assets/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../assets/favicon-16x16.png">
<link rel="shortcut icon" href="../assets/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png">
<link rel="shortcut icon" href="/assets/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dyna">
<meta name="application-name" content="Dyna">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="msapplication-config" content="../assets/browserconfig.xml">
<meta name="msapplication-config" content="/assets/browserconfig.xml">
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#ffffff">
<!--
Expand Down
File renamed without changes.
Loading

0 comments on commit a9556ce

Please sign in to comment.