Skip to content

Commit

Permalink
fix font-awesome
Browse files Browse the repository at this point in the history
  • Loading branch information
xwartz committed Jul 27, 2016
1 parent 7e6837c commit a27d2af
Show file tree
Hide file tree
Showing 47 changed files with 6,638 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ main.js
main.js.map
static/*
!static/package.json
!static/node_modules
12 changes: 11 additions & 1 deletion app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
<head>
<meta charset="utf-8">
<title>Hello Electron React!</title>
<link rel="stylesheet" href="../node_modules/font-awesome/css/font-awesome.min.css" />
<script>
(function () {
const font = (process.env.HOT ? '../' : './') +
'node_modules/font-awesome/css/font-awesome.min.css';
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = font;
document.write(link.outerHTML);
}());
</script>

<script>
(function() {
if (!process.env.HOT) {
Expand Down
12 changes: 12 additions & 0 deletions app/main.development.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@

import { app, BrowserWindow, Menu, shell } from 'electron';

let menu;
let template;
let mainWindow = null;

if (process.env.NODE_ENV === 'production') {
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
}


if (process.env.NODE_ENV === 'development') {
require('electron-debug')(); // eslint-disable-line global-require
Expand Down Expand Up @@ -153,6 +159,12 @@ app.on('ready', async () => {
click() {
mainWindow.setFullScreen(!mainWindow.isFullScreen());
}
}, {
label: 'Toggle Developer Tools',
accelerator: 'Alt+Command+I',
click() {
mainWindow.toggleDevTools();
}
}]
}, {
label: 'Window',
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"compile": "npm run build-renderer && npm run build-main",
"builder": "npm run compile && npm run dist",
"builder:win": "npm run compile && build --win --x64",
"builder:linux": "npm run compile && build --linux"
"builder:linux": "npm run compile && build --linux",
"builder:all": "npm run compile && build -mwl"
},
"build": {
"appId": "org.develar.ElectronReact",
Expand Down Expand Up @@ -109,11 +110,11 @@
"css-loader": "^0.23.1",
"del": "^2.2.1",
"devtron": "^1.2.1",
"electron-builder": "^5.14.2",
"electron-devtools-installer": "^2.0.0",
"electron-packager": "^7.3.0",
"electron-prebuilt": "^1.2.8",
"electron-rebuild": "^1.1.5",
"electron-builder": "^5.14.2",
"eslint": "^2.13.1",
"eslint-config-airbnb": "^9.0.1",
"eslint-import-resolver-webpack": "^0.4.0",
Expand All @@ -123,6 +124,7 @@
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"fbjs-scripts": "^0.7.1",
"html-webpack-plugin": "^2.22.0",
"jsdom": "^9.4.1",
"json-loader": "^0.5.4",
"minimist": "^1.2.0",
Expand All @@ -136,8 +138,7 @@
"webpack": "^1.13.1",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.12.1",
"webpack-merge": "^0.14.0",
"html-webpack-plugin": "^2.22.0"
"webpack-merge": "^0.14.0"
},
"dependencies": {
"css-modules-require-hook": "^4.0.1",
Expand Down
42 changes: 42 additions & 0 deletions static/node_modules/font-awesome/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions static/node_modules/font-awesome/HELP-US-OUT.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 104 additions & 0 deletions static/node_modules/font-awesome/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a27d2af

Please sign in to comment.