-
Notifications
You must be signed in to change notification settings - Fork 16
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
0 parents
commit 2ba72e0
Showing
17 changed files
with
2,461 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.json] | ||
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,8 @@ | ||
node_modules | ||
bower_components | ||
*.log | ||
.DS_Store | ||
Thumbs.db | ||
/build/ | ||
/releases/ | ||
/tmp/ |
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,16 @@ | ||
// ----------------------------------------------------- | ||
// Here is the starting point for your own code. | ||
// All stuff below is just to show you how it works. | ||
// ----------------------------------------------------- | ||
|
||
// Browser modules are imported through new ES6 syntax. | ||
import { greet } from './hello_world/hello_world'; | ||
|
||
// Node modules are required the same way as always. | ||
var os = require('os'); | ||
|
||
var greetElement = document.getElementById('greet'); | ||
greetElement.innerHTML = greet(); | ||
|
||
var platform = document.getElementById('platform-info'); | ||
platform.innerHTML = os.platform(); |
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 @@ | ||
var greet = function () { | ||
return 'Hello Universe!' | ||
}; | ||
|
||
export default greet; |
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,10 @@ | ||
// Default imports test | ||
import greet from './hello_universe'; | ||
|
||
describe("hello universe", function () { | ||
|
||
it("greets better than hello world", function () { | ||
expect(greet()).toBe('Hello Universe!'); | ||
}); | ||
|
||
}); |
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,7 @@ | ||
export var greet = function () { | ||
return 'Hello World!'; | ||
}; | ||
|
||
export var bye = function () { | ||
return 'See ya!'; | ||
}; |
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,14 @@ | ||
// Named imports test | ||
import { greet, bye } from './hello_world'; | ||
|
||
describe("hello world", function () { | ||
|
||
it("greets", function () { | ||
expect(greet()).toBe('Hello World!'); | ||
}); | ||
|
||
it("says goodbye", function () { | ||
expect(bye()).toBe('See ya!'); | ||
}); | ||
|
||
}); |
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"> | ||
|
||
<link href="./stylesheets/main.css" rel="stylesheet" type="text/css"> | ||
|
||
<script src="vendor/require.js"></script> | ||
<script> | ||
requirejs(['app'], function (app) {}); | ||
</script> | ||
|
||
</head> | ||
<body> | ||
|
||
<div class="container"> | ||
<h1 id="greet"></h1> | ||
<p class="subtitle"> | ||
Welcome to <a href="http://electron.atom.io" class="js-external-link">Electron</a> app running on this magnificent <strong id="platform-info"></strong> machine. | ||
</p> | ||
</div> | ||
|
||
</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,33 @@ | ||
'use strict'; | ||
|
||
var app = require('app'); | ||
var BrowserWindow = require('browser-window'); | ||
var jetpack = require('fs-jetpack'); | ||
|
||
// Must keep references to opened windows, | ||
// otherwise Garbage Collector will kick in. | ||
var mainWindow = null; | ||
|
||
// Atom-shell is ready, we can start with our stuff. | ||
app.on('ready', function () { | ||
|
||
var appCodeDir = jetpack.cwd(__dirname); | ||
var manifest = appCodeDir.read('package.json', 'json'); | ||
|
||
mainWindow = new BrowserWindow({ width: 800, height: 600 }); | ||
mainWindow.loadUrl('file://' + __dirname + '/index.html'); | ||
|
||
mainWindow.on('closed', function () { | ||
// Dereference the window object, usually you would store windows | ||
// in an array if your app supports multi windows, this is the time | ||
// when you should delete the corresponding element. | ||
mainWindow = null; | ||
}); | ||
}); | ||
|
||
// Quit when all windows are closed. | ||
app.on('window-all-closed', function () { | ||
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,14 @@ | ||
{ | ||
"name": "electron-boilerplate", | ||
"productName": "Electron Boilerplate", | ||
"description": "Starter for your Electron application. Out of the box ready for serious stuff.", | ||
"version": "0.1.0", | ||
"author": "Mr Gumby <[email protected]>", | ||
"main": "main.js", | ||
"config": { | ||
"target": "development" | ||
}, | ||
"dependencies": { | ||
"fs-jetpack": "^0.6.4" | ||
} | ||
} |
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,25 @@ | ||
html, body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-family: sans-serif; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
} | ||
|
||
.container { | ||
text-align: center; | ||
} | ||
|
||
.subtitle { | ||
color: gray; | ||
} |
Oops, something went wrong.