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
# Install the `electron` command globally in your %PATH% | |
npm install electron -g | |
# Install as a development dependency | |
npm install electron --save-dev |
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
{ | |
"name": "your-app", | |
"version": "1.0.0", | |
"main": "main.js", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"devDependencies": { | |
"electron": "^1.4.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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using node <script>document.write(process.versions.node)</script>, | |
Chromium <script>document.write(process.versions.chrome)</script>, |
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
const electron = require('electron') | |
// Module to control application life. | |
const app = electron.app | |
// Module to create native browser window. | |
const BrowserWindow = electron.BrowserWindow | |
// Keep a global reference of the window object, if you don't, the window will | |
// be closed automatically when the JavaScript object is garbage collected. | |
let mainWindow |
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
bintrayRepositories = [ | |
"griffon/griffon-lazybones-templates", | |
"pledbrook/lazybones-templates" | |
] |
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
lazybones create griffon-javafx-groovy griffon-javafx-groovy-sample |
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
. | |
├── build.gradle | |
├── griffon-app | |
│ ├── conf | |
│ ├── controllers | |
│ ├── i18n | |
│ ├── lifecycle | |
│ ├── models | |
│ ├── resources | |
│ ├── services |
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
package org.example | |
import griffon.core.artifact.GriffonModel | |
import griffon.transform.FXObservable | |
import griffon.metadata.ArtifactProviderFor | |
@ArtifactProviderFor(GriffonModel) | |
class HomeModel { | |
@FXObservable String clickCount = "0" | |
} |
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
package org.example | |
import griffon.core.artifact.GriffonView | |
import griffon.inject.MVCMember | |
import griffon.metadata.ArtifactProviderFor | |
import javax.annotation.Nonnull | |
@ArtifactProviderFor(GriffonView) | |
class HomeView { | |
@MVCMember @Nonnull |
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
package org.example | |
import griffon.core.artifact.GriffonController | |
import griffon.inject.MVCMember | |
import griffon.metadata.ArtifactProviderFor | |
import griffon.transform.Threading | |
import javax.annotation.Nonnull | |
@ArtifactProviderFor(GriffonController) | |
class HomeController { |
OlderNewer