-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d3d600
commit 58adfa8
Showing
15 changed files
with
251 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[{package.json,*.yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OS | ||
|
||
._* | ||
.DS_Store | ||
|
||
# NodeJS | ||
|
||
npm-debug.log | ||
|
||
node_modules | ||
bower_components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Michael Ciniawsky <michael.ciniawsky@gmail.com> (http://michael-ciniawsky.de) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# PostHTML Electron | ||
## Install | ||
|
||
``` | ||
$ sudo npm i | ||
``` | ||
|
||
## Start | ||
|
||
``` | ||
$ npm start | ||
``` | ||
|
||
## Build | ||
|
||
``` | ||
$ npm run build | ||
``` | ||
|
||
Builds the app for OS X, Linux, and Windows, using [electron-packager](https://github.com/maxogden/electron-packager). | ||
|
||
## License | ||
MIT © [Michael Ciniawsky](http://michael-ciniawsky.de) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div block="component"> | ||
<h1>Component</h1> | ||
<div elem="section">Section</div> | ||
<div elem="section" mods="modified">Section modified</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center | ||
|
||
width: 500px; | ||
height: 250px; | ||
|
||
color: white | ||
text-align: center; | ||
} | ||
|
||
header h1 { | ||
font-size: 2rem; | ||
font-weight: 100; | ||
font-family: 'Helvetica Neue', Helvetica, sans-serif; | ||
} | ||
|
||
main { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center | ||
} | ||
|
||
main img { | ||
width: 200px; | ||
height: 200px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Electron</title> | ||
<link rel="stylesheet" href="index.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<header block="header"> | ||
<h1 elem="title">Gir's Electron Boilerplate</h1> | ||
</header> | ||
<main block="main"> | ||
<img elem="img" src="gir.jpg" alt="Gir"> | ||
<include src="include/section.html"></include> | ||
</main> | ||
</div> | ||
|
||
<script src="index.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// 'use strict' | ||
// | ||
// const remote = require('electron').remote | ||
// const Menu = remote.Menu | ||
// const MenuItem = remote.MenuItem | ||
// | ||
// let menu = new Menu() | ||
// | ||
// menu.append(new MenuItem({ | ||
// label: 'Electron' | ||
// })) | ||
// menu.append(new MenuItem({ | ||
// type: 'separator' | ||
// })) | ||
// menu.append(new MenuItem({ | ||
// label: 'Menu', type: 'checkbox', checked: true | ||
// })) | ||
// | ||
// window.addEventListener('contextmenu', (e) => { | ||
// e.preventDefault() | ||
// menu.popup(remote.getCurrentWindow()) | ||
// }, false) | ||
// | ||
// let notification = new Notification('Title', { | ||
// body: 'Lorem Ipsum Dolor Sit Amet' | ||
// }) | ||
// | ||
// notification.onclick = () => { | ||
// console.log('Notification clicked') | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict' | ||
|
||
var app = require('electron').app | ||
|
||
var bem = require('posthtml-bem') | ||
var include = require('posthtml-include') | ||
|
||
var posthtml = require('electron-posthtml')([include({root: './client/'}), bem()]) | ||
|
||
const BrowserWindow = require('electron').BrowserWindow | ||
|
||
// require('electron').crashReporter.start() | ||
|
||
app.on('ready', () => { | ||
// Main Window | ||
let main = new BrowserWindow({ | ||
width: 1200, | ||
height: 900, | ||
position: 'center', | ||
resizable: true, | ||
frame: false | ||
}) | ||
main.loadURL(`file://${__dirname}/client/index.html`) | ||
main.webContents.openDevTools() | ||
main.on('closed', () => { | ||
main = null | ||
}) | ||
}) | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "electron", | ||
"version": "0.36.7", | ||
"description": "Electron Boilerplate", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"files": [ | ||
"client/index.js", | ||
"client/index.html", | ||
"client/index.css" | ||
], | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"start": "electron .", | ||
"build": "electron-packager . $npm_package_productName --out=dist --ignore=dist --prune --asar --all --version=0.36.3" | ||
}, | ||
"dependencies": { | ||
"electron-posthtml": "^0.8.0", | ||
"posthtml-bem": "^0.2.2", | ||
"posthtml-include": "^1.0.2" | ||
}, | ||
"devDependencies": { | ||
"electron-debug": "^0.5.1", | ||
"electron-packager": "^5.2.0", | ||
"electron-prebuilt": "^0.36.7" | ||
}, | ||
"author": { | ||
"name": "Michael Ciniawsky", | ||
"email": "michael.ciniawsky@gmail.com", | ||
"url": "michael-ciniawsky.de" | ||
}, | ||
"keywords": [ | ||
"Electron" | ||
] | ||
} |