-
Notifications
You must be signed in to change notification settings - Fork 0
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
bc9b0ae
commit f7718eb
Showing
6 changed files
with
679 additions
and
31 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,53 @@ | ||
'use strict'; | ||
|
||
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; | ||
|
||
function createWindow() { | ||
// Create the browser window. | ||
mainWindow = new BrowserWindow({ width: 1024, height: 768 }); | ||
|
||
mainWindow.setMenu(null); | ||
|
||
// and load the index.html of the app. | ||
mainWindow.loadURL('file://' + __dirname + '/index.html'); | ||
|
||
// Open the DevTools. | ||
mainWindow.webContents.openDevTools(); | ||
|
||
// Emitted when the window is closed. | ||
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; | ||
}); | ||
} | ||
|
||
// This method will be called when Electron has finished | ||
// initialization and is ready to create browser windows. | ||
app.on('ready', createWindow); | ||
|
||
// Quit when all windows are closed. | ||
app.on('window-all-closed', function () { | ||
// On OS X it is common for applications and their menu bar | ||
// to stay active until the user quits explicitly with Cmd + Q | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
app.on('activate', function () { | ||
// On OS X it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open. | ||
if (mainWindow === null) { | ||
createWindow(); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,27 @@ | ||
/// <binding BeforeBuild='build' /> | ||
var gulp = require('gulp'); | ||
var bower = require('gulp-bower'); | ||
var runElectron = require("gulp-run-electron"); | ||
|
||
gulp.task('default', function() { | ||
// place code for your default task here | ||
gulp.task("watch", function () { | ||
return gulp.watch("app/**/*", runElectron.rerun); | ||
}); | ||
|
||
gulp.task("build",['bower'], function () { | ||
return gulp.src("app/**/*").pipe(gulp.dest("build")); | ||
}); | ||
|
||
gulp.task("run", function () { | ||
return gulp.src("build").pipe(runElectron()); | ||
}); | ||
|
||
gulp.task("default", ["watch", "build", "run"], function () { | ||
}); | ||
|
||
gulp.task('bower', function() { | ||
return bower(); | ||
bower(); | ||
gulp.src("semantic/dist/*.min.js").pipe(gulp.dest("build/lib")); | ||
gulp.src("semantic/dist/*.min.css").pipe(gulp.dest("build/css")); | ||
gulp.src("bower_components/jquery/dist/*.min.js").pipe(gulp.dest("build/lib")); | ||
return gulp.src("bower_components/react/*.min.js").pipe(gulp.dest("build/lib")); | ||
}); |
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