Skip to content

Commit

Permalink
Add build process
Browse files Browse the repository at this point in the history
  • Loading branch information
Pontus Abrahamsson committed Apr 3, 2016
1 parent 2740a46 commit 6731285
Show file tree
Hide file tree
Showing 247 changed files with 45,479 additions and 81 deletions.
23 changes: 23 additions & 0 deletions desktop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const menubar = require('menubar');
const path = require('path');

// enable ES6 (transpiling behind the scene)
require('babel-register');

// start frontend server
require('./src/server.js');

// start api server
require('./api/api.js');

menubar({
icon: path.join(__dirname, '/desktop/icons/UberLogo.png'),
// transparent: true,
movable: false,
resizable: false,
useContentSize: true,
height: 525,
width: 340,
index: `file://${__dirname}/desktop/app.html`,
y: 30,
});
53 changes: 47 additions & 6 deletions desktop/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,56 @@
and surge also need the callback id to confirme the
rate limit. This is not optimal but it works for now...
-->
<style>
body {
width: 340px;
height: 495px;
padding: 0;
margin: 14px 0 0;
position: relative;
}

<link rel="stylesheet" type="text/css" href="webview.css" />
<script src="webview.js" async></script>
body:after {
bottom: 100%;
left: 50%;
border: solid transparent;
content: '';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #fff;
border-width: 14px;
margin-left: -14px;
}
</style>

<webview
id="uber"
src="http://localhost:5555"
minwidth="340"
minheight="515"
partition="persist:fastlane"
src="https://github.com/atom/electron/blob/master/docs/api/web-view-tag.md"
width="340"
height="515"
useragent="Fastlane">
</webview>

<script>
/* eslint prefer-template: 0 */
const webview = document.getElementById('uber');

// This is needed to remove facebook login and hide links to browse uber.com
webview.addEventListener('dom-ready', () => {
webview.insertCSS([
'.btn--link',
'.text-uber-white',
'p.text--center',
'.btn--facebook',
].join() + '{display:none!important;}');

webview.insertCSS(
'header.contextual {position:fixed !important;} .wrapper {padding-top: 80px !important;}'
);

webview.openDevTools();
});
</script>
21 changes: 0 additions & 21 deletions desktop/app.js

This file was deleted.

22 changes: 0 additions & 22 deletions desktop/webview.css

This file was deleted.

22 changes: 0 additions & 22 deletions desktop/webview.js

This file was deleted.

4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html>
<head>
<style type="text/css">
body { margin: 0; }
body { margin: 0; background: #fff; }
#root { width: 340px; height: 495px; overflow: hidden; }
</style>
</head>
<body>
<div id="root"></div>

<script src="https://maps.googleapis.com/maps/api/js?libraries=places"></script>
<script src="./public/bundle.js"></script>
<script src="http://fastlaneapp.co/assets/bundle.js"></script>
</body>
</html>
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "FastLane",
"name": "Fastlane",
"author": "Pontus Abrahamsson",
"homepage": "http://fastlaneapp.co",
"version": "1.0.0",
"main": "index.js",
"main": "desktop.js",
"private": true,
"scripts": {
"dev": "webpack -w & node index.js",
"desktop": "webpack -p & electron desktop/app.js",
"desktop": "webpack -p & electron desktop.js",
"lint": "./node_modules/eslint/bin/eslint.js \"src/**/?(*.js|*.jsx)\" index.js"
},
"dependencies": {
Expand All @@ -17,8 +17,8 @@
"classnames": "^2.2.3",
"express": "^4.13.4",
"history": "^2.0.1",
"lodash": "^4.6.1",
"menubar": "4.0.2",
"lodash": "^4.7.0",
"menubar": "4.1.0",
"node-fetch": "^1.4.1",
"query-string": "^4.1.0",
"react": "^0.14.8",
Expand All @@ -33,15 +33,15 @@
},
"devDependencies": {
"babel-core": "^6.7.4",
"babel-eslint": "^6.0.0",
"babel-eslint": "^6.0.2",
"babel-loader": "^6.2.4",
"babel-plugin-react-transform": "^2.0.2",
"babel-plugin-transform-runtime": "^6.6.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"css-loader": "^0.23.1",
"eslint": "^2.5.3",
"eslint": "^2.6.0",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-react": "^4.2.3",
"json-loader": "^0.5.4",
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>14B25</string>
<key>CFBundleExecutable</key>
<string>Electron Framework</string>
<key>CFBundleIdentifier</key>
<string>com.github.electron.framework</string>
<key>CFBundleName</key>
<string>Electron Framework</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>DTSDKBuild</key>
<string>14D125</string>
<key>DTSDKName</key>
<string>macosx10.10</string>
<key>DTXcode</key>
<string>0640</string>
<key>DTXcodeBuild</key>
<string>6E35b</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 6731285

Please sign in to comment.