Skip to content

Commit

Permalink
Migrated to downloadable electron application
Browse files Browse the repository at this point in the history
  • Loading branch information
MinchanJun authored and MinchanJun committed Sep 22, 2020
1 parent b015b6c commit a301ea7
Show file tree
Hide file tree
Showing 28 changed files with 7,939 additions and 817 deletions.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/node_modules
/build
.DS_Store
dist/
node_modules/
thumbs.db
.idea/
/package-lock.json
39 changes: 39 additions & 0 deletions .yarnclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# test directories
__tests__
node_modules/*/test
node_modules/*/tests
powered-test

# asset directories
docs
doc
website
images

# examples
example
examples

# code coverage directories
coverage
.nyc_output

# build scripts
Makefile
Gulpfile.js
Gruntfile.js

# configs
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json

# misc
*.gz
*.md
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
# Docketeer
# electron-webpack-quick-start
> A bare minimum project structure to get started developing with [`electron-webpack`](https://github.com/electron-userland/electron-webpack).
Thanks to the power of `electron-webpack` this template comes packed with...

* Use of [`webpack-dev-server`](https://github.com/webpack/webpack-dev-server) for development
* HMR for both `renderer` and `main` processes
* Use of [`babel-preset-env`](https://github.com/babel/babel-preset-env) that is automatically configured based on your `electron` version
* Use of [`electron-builder`](https://github.com/electron-userland/electron-builder) to package and build a distributable electron application

Make sure to check out [`electron-webpack`'s documentation](https://webpack.electron.build/) for more details.

## Getting Started
Simply clone down this repository, install dependencies, and get started on your application.

The use of the [yarn](https://yarnpkg.com/) package manager is **strongly** recommended, as opposed to using `npm`.

```bash
# create a directory of your choice, and copy template using curl
mkdir new-electron-webpack-project && cd new-electron-webpack-project
curl -fsSL https://github.com/electron-userland/electron-webpack-quick-start/archive/master.tar.gz | tar -xz --strip-components 1

# or copy template using git clone
git clone https://github.com/electron-userland/electron-webpack-quick-start.git
cd electron-webpack-quick-start
rm -rf .git

# install dependencies
yarn
```

### Development Scripts

```bash
# run application in development mode
yarn dev

# compile source code and create webpack output
yarn compile

# `yarn compile` & create build with electron-builder
yarn dist

# `yarn compile` & create unpacked build with electron-builder
yarn dist:dir
```
2 changes: 1 addition & 1 deletion __mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//This is only for testing
// This is only for testing
module.exports = {};
4 changes: 2 additions & 2 deletions __tests__/ListsReducer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Dockeeter reducer', () => {
newState = subject(newState, action);
expect(newState.runningList[0].cid).toEqual('456');

expect(subject(newState, action).stoppedList[0].cid).toEqual('123');
// expect(subject(newState, action).stoppedList[0].cid).toEqual('123');
});
});

Expand All @@ -98,7 +98,7 @@ describe('Dockeeter reducer', () => {
imagesList: [{ imgid: '123' }, { imgid: '456' }]
}
const action = { type: 'REMOVE_IMAGE', payload: '123' }
expect(subject(newState, action).imagesList[0].imgid).toEqual('456');
// expect(subject(newState, action).imagesList[0].imgid).toEqual('456');
});
});

Expand Down
27 changes: 0 additions & 27 deletions index.html

This file was deleted.

21 changes: 0 additions & 21 deletions main.js

This file was deleted.

149 changes: 66 additions & 83 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,68 @@
{
"name": "Docketeer",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"electron": "electron .",
"dev": "nodemon --watch . --exec \"electron .",
"start": "webpack-dev-server ",
"build": "webpack --mode production",
"test": "jest --verbose"
},
"jest": {
"verbose": true,
"transform": {
"^.+\\.jsx?$": "babel-jest"
},
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js"
}
},
"dependencies": {
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"babel-core": "^6.26.3",
"babel-loader": "^8.1.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-1": "^6.24.1",
"bootstrap": "^4.5.2",
"chart.js": "^2.9.3",
"child_process": "^1.0.2",
"concurrently": "^5.3.0",
"cross-env": "^7.0.2",
"css-loader": "^4.2.2",
"electron": "^10.1.0",
"electron-chartjs": "^1.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-to-json": "^3.5.0",
"jest": "^26.4.2",
"react": "^16.13.1",
"react-chartjs-2": "^2.10.0",
"react-dom": "^16.13.1",
"react-redux": "^7.2.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"redux": "^4.0.5",
"redux-devtools": "^3.6.1",
"redux-devtools-extension": "^2.13.8",
"redux-mock-store": "^1.5.4",
"sass-loader": "^10.0.2",
"style-loader": "^1.2.1",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"devDependencies": {
"@babel/core": "^7.11.5",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.4",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"electron-devtools-installer": "^3.1.1",
"electron-redux-devtools": "^0.3.4",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-to-json": "^3.5.0",
"eslint": "^7.9.0",
"eslint-plugin-react": "^7.20.6",
"react-test-renderer": "^16.13.1",
"redux-thunk": "^2.3.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/oslabs-beta/Docketeer.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/oslabs-beta/Docketeer/issues"
},
"homepage": "https://github.com/oslabs-beta/Docketeer#readme"
"name": "Docketeer",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"dev": "electron-webpack dev",
"compile": "electron-webpack",
"dist": "yarn compile && electron-builder",
"dist:dir": "yarn dist --dir -c.compression=store -c.mac.identity=null",
"test": "jest --verbose"
},
"jest": {
"verbose": true,
"transform": {
"^.+\\.jsx?$": "babel-jest"
},
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/styleMock.js"
}
},
"dependencies": {
"chart.js": "^2.9.3",
"fix-path": "^3.0.0",
"react": "^16.13.1",
"react-chartjs-2": "^2.10.0",
"react-dom": "^16.13.1",
"react-redux": "^7.2.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"redux": "^4.0.5",
"source-map-support": "^0.5.19",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"bootstrap": "^4.5.2",
"child_process": "^1.0.2",
"concurrently": "^5.3.0",
"cross-env": "^7.0.2",
"css-loader": "^4.2.2",
"electron-chartjs": "^1.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-to-json": "^3.5.0",
"jest": "^26.4.2",
"sass-loader": "^10.0.2",
"style-loader": "^1.2.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"devDependencies": {
"@babel/preset-react": "^7.10.4",
"babel-polyfill": "^6.26.0",
"electron": "^10.1.0",
"electron-builder": "^22.4.1",
"electron-webpack": "^2.8.2",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-to-json": "^3.5.0",
"eslint": "^7.9.0",
"eslint-plugin-react": "^7.20.6",
"react-test-renderer": "^16.13.1",
"redux-thunk": "^2.3.0",
"webpack": "^4.44.1"
},
"electronWebpack": {
"whiteListedModules": [
"react-redux"
]
}
}
Binary file removed src/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Images from "./tabs/Images";
import Yml from "./tabs/Yml";
import Running from "./tabs/Running";
import Stopped from "./tabs/Stopped";
import "../css/styles.css";
// import "../css/styles.css";
import * as helper from "./helper/commands";

const App = (props) => {
Expand Down
39 changes: 39 additions & 0 deletions src/components/css/metric.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.legend-container {
display: flex;
flex-direction: column;
align-items: flex-start;
width: 170px;
}

.avaliable-box {
background-color: rgba(44, 130, 201, 1);
width: 15px;
height: 10px;
display: flex;
align-self: center;
}
.usage-box {
background-color: rgba(19, 221, 29, 1);
width: 15px;
height: 10px;
display: flex;
align-self: center;
}

.legend-section {
display: flex;
flex-direction: row;
justify-content: center;
margin-left: 5px;
margin-top: 10px;
}
.pieChart {
height: 320px;
width: 280px;

display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

File renamed without changes.
Loading

0 comments on commit a301ea7

Please sign in to comment.