Skip to content

Commit 390f665

Browse files
authored
Merge pull request #1 from codehangar/develop
Release 0.1.0
2 parents 34ec4e6 + 534b9dd commit 390f665

118 files changed

Lines changed: 7198 additions & 2891 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"presets": ["es2015", "react"]
2+
"presets": ["es2015", "react", "stage-0"],
3+
"plugins": [
4+
["transform-runtime", {
5+
"polyfill": false,
6+
"regenerator": true
7+
}]
8+
]
39
}

.gitignore

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
node_modules
22
npm-debug.log
3-
dev
4-
build
5-
ReQLPro-darwin-x64
3+
dist
4+
builds
5+
apps
6+
7+
# WebStorm Settings
8+
.idea/**
9+
!.idea/codeStyleSettings.xml
10+
11+
# Generated Coverage Report
12+
coverage/

.idea/codeStyleSettings.xml

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.istanbul.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
instrumentation:
2+
extension: .js
3+
root: ./public
4+
include-all-sources: true
5+
verbose: true
6+
save-baseline: true
7+
excludes: ["**/*.spec.js" ]
8+
reporting:
9+
dir: "coverage"

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
# RethinkDB Client
1+
# ReQLPro
2+
3+
## Test Status
4+
5+
`develop`
6+
- [![CircleCI](https://circleci.com/gh/codehangar/reqlpro/tree/develop.svg?style=shield&circle-token=1e39f63fbc10770fa2ae80e841f43faf5f39f59b)](https://circleci.com/gh/codehangar/reqlpro/tree/develop)
7+
8+
`master`
9+
- [![CircleCI](https://circleci.com/gh/codehangar/reqlpro/tree/master.svg?style=shield&circle-token=1e39f63fbc10770fa2ae80e841f43faf5f39f59b)](https://circleci.com/gh/codehangar/reqlpro/tree/master)
210

311
## Setup
412

513
- npm install
614
- npm start
715

8-
You have to stop and start the process on code changes, until we get a live reload type solution setup.
9-
1016
## Code Structure
1117

1218
The main.js file at root is similar to a server.js file for a node web server. It handles spawning the main window process.
@@ -23,5 +29,13 @@ The rethinkdb.client.js file is the the source of the truth for all the applicat
2329
- npm run package (makes an archive of the app folder)
2430
- delete Appfolder/AppName.app/Contents/Resources/app (this is so people cant see the source code of the app)
2531

26-
## Installing Wine for building Windows distributions on Mac
27-
https://www.davidbaumgold.com/tutorials/wine-mac/#part-2:-install-homebrew-cask
32+
## Mac Packaging
33+
- You will need to install this npm package locally. We cannot add to this package.json because it fails in linux npm installs (i.e. our CI server)
34+
- https://www.npmjs.com/package/appdmg
35+
36+
## Testing and Code Coverage
37+
- npm test
38+
- npm run test-coverage
39+
40+
To see the results of the test coverage, view the `coverage/lcov-report/index.html` file in your browser
41+

build.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

circle.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Customize the test machine
2+
machine:
3+
4+
# Version of node to use
5+
node:
6+
version: 6.9.2
7+
8+
# Override /etc/hosts
9+
hosts:
10+
circlehost: 127.0.0.1
11+
dev.mycompany.com: 127.0.0.1
12+
13+
# Add some environment variables
14+
environment:
15+
CIRCLE_ENV: test
16+
17+
## Customize general stuff
18+
general:
19+
artifacts:
20+
- "artifacts/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH-$CIRCLE_BUILD_NUM.tar" # relative to the build directory
21+
22+
## Customize test commands
23+
test:
24+
override:
25+
- npm run test-circle:
26+
environment:
27+
MOCHA_FILE: $CIRCLE_TEST_REPORTS/junit/test-results.xml
28+
post:
29+
- npm run test-coverage
30+
# Move the coverage report to the artifacts folder
31+
- mv coverage/ $CIRCLE_ARTIFACTS/coverage
32+
33+
## Custom notifications
34+
notify:
35+
webhooks:
36+
# A list of hashes representing hooks. Only the url field is supported.
37+
# - url: https://someurl.com/hooks/circle

main.electron-utils.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
'use strict';
2+
3+
const { BrowserWindow } = require('electron');
4+
5+
// Keep a global reference of the window object, if you don't, the window will
6+
// be closed automatically when the JavaScript object is garbage collected.
7+
let mainWindow;
8+
9+
function getMainWindow() {
10+
return mainWindow;
11+
}
12+
13+
function createWindow() {
14+
// Create the browser window.
15+
mainWindow = new BrowserWindow({
16+
width: 1600,
17+
height: 1200,
18+
'min-width': 600,
19+
'min-height': 400
20+
});
21+
22+
// and load the index.html of the app.
23+
if (process.env.NODE_ENV === 'development') {
24+
mainWindow.loadURL('http://localhost:3001/index.html');
25+
mainWindow.webContents.openDevTools();
26+
} else {
27+
mainWindow.loadURL('file://' + __dirname + '/dist/index.html');
28+
}
29+
30+
// Emitted when the window is closed.
31+
mainWindow.on('closed', function() {
32+
// Dereference the window object, usually you would store windows
33+
// in an array if your app supports multi windows, this is the time
34+
// when you should delete the corresponding element.
35+
mainWindow = null;
36+
});
37+
}
38+
39+
// Create new window instances
40+
function createNewWindow(event, config) {
41+
let win = new BrowserWindow({
42+
width: config.width || 1000,
43+
height: config.height || 700,
44+
show: true
45+
});
46+
47+
if (process.env.NODE_ENV === 'development') {
48+
win.loadURL('http://localhost:3001' + (config.path || '/index.html'));
49+
win.webContents.openDevTools();
50+
} else {
51+
win.loadURL('file://' + __dirname + '/dist' + (config.path || '/index.html'));
52+
}
53+
54+
win.on('closed', function() {
55+
win = null;
56+
});
57+
}
58+
59+
function launchFeedbackPopup() {
60+
mainWindow.webContents.send('launchFeedbackPopup');
61+
}
62+
63+
module.exports = {
64+
createWindow,
65+
createNewWindow,
66+
getMainWindow,
67+
launchFeedbackPopup
68+
};

0 commit comments

Comments
 (0)