Please download workshop files here:
https://github.com/blackgirlscode/electron-demo
FRONTEND DEVELOPER
DUGGIEMITCHELL.GITHUB.IO
@DUGGIEMITCHELL
Nodejs + chromium
io.js + chromium
A framework for building desktop applications using web technologies.
HTML, CSS, JS
...unless you want to
JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
{
"main": "main.js"
}
const electron = require('electron');
const {app} = electron;
let BrowserWindow = require('browser-window');
app.on('ready', function() {
mainWindow = new BrowserWindow(
{ width: 500,
height: 300})
});
<html> <head> <body> <h1>Hello, Beautiful</h1> <script> window.onload = function() { var fs = require('fs') var p = document.createElement('p') p.textContent = fs.readFileSync('file.txt') document.body.appendChild(p) </script>
npm install -g electron-prebuild --save -dev