Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Nov 6, 2015
1 parent 4c5554d commit 2669ddf
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .electrify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
.dist
app
bin
db
node_modules
3 changes: 3 additions & 0 deletions .electrify/electrify.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": []
}
73 changes: 73 additions & 0 deletions .electrify/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
var app = require('app');
var browser = require('browser-window');
var electrify = require('electrify')(__dirname);

var window = null;

app.on('ready', function() {

// electrify start
electrify.start(function(meteor_root_url) {

// creates a new electron window
window = new browser({
width: 1600, height: 1000,
'node-integration': false // node integration must to be off
});

// open up meteor root url
window.loadUrl(meteor_root_url);
});
});


app.on('window-all-closed', function() {
app.quit();
});


app.on('will-quit', function terminate_and_quit(event) {

// if electrify is up, cancel exiting with `preventDefault`,
// so we can terminate electrify gracefully without leaving child
// processes hanging in background
if(electrify.isup() && event) {

// holds electron termination
event.preventDefault();

// gracefully stops electrify
electrify.stop(function(){

// and then finally quit app
app.quit();
});
}
});

//
// =============================================================================
//
// the methods bellow can be called seamlessly from your Meteor's
// client and server code, using:
//
// Electrify.call('methodname', [..args..], callback);
//
// ATENTION:
// From meteor, you can only call these methods after electrify is fully
// started, use the Electrify.startup() convenience method for this
//
//
// Electrify.startup(function(){
// Electrify.call(...);
// });
//
// =============================================================================
//
// electrify.methods({
// 'method.name': function(name, done) {
// // do things... and call done(err, arg1, ..., argN)
// done(null);
// }
// });
//
7 changes: 7 additions & 0 deletions .electrify/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Cinematic",
"main": "index.js",
"dependencies": {
"electrify": "2.0.0"
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ coverage
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
dist
.electrify
.electrify/.dist

# Dependency directory
# Deployed apps should consider commenting this line out:
Expand Down

0 comments on commit 2669ddf

Please sign in to comment.