mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Initial work towards rc0.2.0
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to Kitematic</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
<script src="index.js" type="text/javascript"></script>
|
||||
</html>
|
||||
66
index.js
66
index.js
@@ -4,6 +4,9 @@ var os = require('os');
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var app = require('app');
|
||||
var BrowserWindow = require('browser-window');
|
||||
|
||||
var freeport = function (callback) {
|
||||
var server = net.createServer();
|
||||
var port = 0;
|
||||
@@ -52,7 +55,6 @@ var start = function (callback) {
|
||||
var started = false;
|
||||
mongoChild.stdout.setEncoding('utf8');
|
||||
mongoChild.stdout.on('data', function (data) {
|
||||
console.log(data);
|
||||
if (data.indexOf('waiting for connections on port ' + mongoPort)) {
|
||||
if (!started) {
|
||||
started = true;
|
||||
@@ -68,7 +70,6 @@ var start = function (callback) {
|
||||
user_env.BIND_IP = '127.0.0.1';
|
||||
user_env.DB_PATH = dataPath;
|
||||
user_env.MONGO_URL = 'mongodb://localhost:' + mongoPort + '/meteor';
|
||||
console.log(path.join(process.cwd(), 'resources', 'node'));
|
||||
var nodeChild = child_process.spawn(path.join(process.cwd(), 'resources', 'node'), ['./bundle/main.js'], {
|
||||
env: user_env
|
||||
});
|
||||
@@ -94,40 +95,33 @@ var start = function (callback) {
|
||||
}
|
||||
};
|
||||
|
||||
start(function (url, nodeChild, mongoChild) {
|
||||
var cleanUpChildren = function () {
|
||||
console.log('Cleaning up children.')
|
||||
mongoChild.kill();
|
||||
nodeChild.kill();
|
||||
};
|
||||
if (nodeChild && mongoChild) {
|
||||
process.on('exit', cleanUpChildren);
|
||||
process.on('uncaughtException', cleanUpChildren);
|
||||
process.on('SIGINT', cleanUpChildren);
|
||||
process.on('SIGTERM', cleanUpChildren);
|
||||
}
|
||||
app.on('activate-with-no-open-windows', function () {
|
||||
mainWindow.show();
|
||||
return false;
|
||||
});
|
||||
|
||||
var gui = require('nw.gui');
|
||||
var mainWindow = gui.Window.get();
|
||||
gui.App.on('reopen', function () {
|
||||
app.on('ready', function() {
|
||||
start(function (url, nodeChild, mongoChild) {
|
||||
var cleanUpChildren = function () {
|
||||
console.log('Cleaning up children.')
|
||||
mongoChild.kill();
|
||||
nodeChild.kill();
|
||||
app.quit();
|
||||
process.exit();
|
||||
};
|
||||
|
||||
if (nodeChild && mongoChild) {
|
||||
process.on('exit', cleanUpChildren);
|
||||
process.on('uncaughtException', cleanUpChildren);
|
||||
process.on('SIGINT', cleanUpChildren);
|
||||
process.on('SIGTERM', cleanUpChildren);
|
||||
}
|
||||
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({width: 800, height: 578, frame:false, resizable: false});
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadUrl(url);
|
||||
mainWindow.show();
|
||||
});
|
||||
setTimeout(function () {
|
||||
mainWindow.window.location = url;
|
||||
mainWindow.on('loaded', function () {
|
||||
mainWindow.show();
|
||||
});
|
||||
}, 400);
|
||||
mainWindow.on('close', function (type) {
|
||||
this.hide();
|
||||
console.log('closed');
|
||||
if (type === 'quit') {
|
||||
console.log('here');
|
||||
if (nodeChild && mongoChild) {
|
||||
cleanUpChildren();
|
||||
}
|
||||
this.close(true);
|
||||
}
|
||||
console.log('Window Closed.');
|
||||
});
|
||||
});
|
||||
});
|
||||
6
meteor/.meteor/.finished-upgraders
Normal file
6
meteor/.meteor/.finished-upgraders
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file contains information which helps Meteor properly upgrade your
|
||||
# app when you run 'meteor update'. You should check it into version control
|
||||
# with your project.
|
||||
|
||||
notices-for-0.9.0
|
||||
notices-for-0.9.1
|
||||
@@ -6,10 +6,9 @@
|
||||
standard-app-packages
|
||||
less
|
||||
bootstrap3-less
|
||||
iron-router
|
||||
handlebar-helpers
|
||||
underscore-string-latest
|
||||
collection-helpers
|
||||
octicons
|
||||
fast-render
|
||||
iron-router-ga
|
||||
iron:router
|
||||
reywood:iron-router-ga
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.8.3
|
||||
METEOR@0.9.1.1
|
||||
|
||||
@@ -1,60 +1,54 @@
|
||||
accounts-base@1.0.0
|
||||
application-configuration@1.0.0
|
||||
autoupdate@1.0.4
|
||||
application-configuration@1.0.1
|
||||
autoupdate@1.0.6
|
||||
binary-heap@1.0.0
|
||||
blaze-tools@1.0.0
|
||||
blaze@1.0.3
|
||||
blaze@2.0.0
|
||||
bootstrap3-less@0.0.0
|
||||
callback-hook@1.0.0
|
||||
check@1.0.0
|
||||
collection-helpers@0.0.0
|
||||
collection-hooks@0.0.0
|
||||
collection2@0.0.0
|
||||
ctl-helper@1.0.2
|
||||
ctl@1.0.0
|
||||
deps@1.0.0
|
||||
ejson@1.0.0
|
||||
fast-render@0.0.0
|
||||
follower-livedata@1.0.0
|
||||
ctl-helper@1.0.3
|
||||
ctl@1.0.1
|
||||
ddp@1.0.8
|
||||
deps@1.0.3
|
||||
ejson@1.0.1
|
||||
follower-livedata@1.0.1
|
||||
geojson-utils@1.0.0
|
||||
handlebar-helpers@0.0.0
|
||||
headers@0.0.0
|
||||
html-tools@1.0.0
|
||||
htmljs@1.0.0
|
||||
id-map@1.0.0
|
||||
inject-initial@0.0.0
|
||||
iron-core@0.2.0
|
||||
iron-dynamic-template@0.2.1
|
||||
iron-layout@0.2.0
|
||||
iron-router@0.8.2
|
||||
iron:core@0.3.4
|
||||
iron:dynamic-template@0.4.1
|
||||
iron:layout@0.4.1
|
||||
iron:router@0.9.3
|
||||
jquery@1.0.0
|
||||
json@1.0.0
|
||||
less@1.0.4
|
||||
livedata@1.0.5
|
||||
localstorage@1.0.0
|
||||
less@1.0.7
|
||||
livedata@1.0.9
|
||||
logging@1.0.2
|
||||
meteor@1.0.2
|
||||
meteor-platform@1.0.2
|
||||
meteor@1.0.3
|
||||
minifiers@1.0.2
|
||||
minimongo@1.0.1
|
||||
moment@0.0.0
|
||||
mongo-livedata@1.0.3
|
||||
npm@0.0.0
|
||||
observe-sequence@1.0.1
|
||||
octicons@0.0.0
|
||||
minimongo@1.0.2
|
||||
mongo-livedata@1.0.4
|
||||
mongo@1.0.4
|
||||
observe-sequence@1.0.2
|
||||
ordered-dict@1.0.0
|
||||
random@1.0.0
|
||||
reactive-dict@1.0.0
|
||||
reload@1.0.0
|
||||
reactive-dict@1.0.2
|
||||
reactive-var@1.0.1
|
||||
reload@1.0.1
|
||||
retry@1.0.0
|
||||
reywood:iron-router-ga@0.3.2
|
||||
routepolicy@1.0.0
|
||||
service-configuration@1.0.0
|
||||
session@1.0.0
|
||||
simple-schema@0.0.0
|
||||
spacebars-compiler@1.0.1
|
||||
spacebars@1.0.0
|
||||
standard-app-packages@1.0.0
|
||||
templating@1.0.4
|
||||
ui@1.0.0
|
||||
session@1.0.1
|
||||
spacebars-compiler@1.0.2
|
||||
spacebars@1.0.1
|
||||
standard-app-packages@1.0.1
|
||||
templating@1.0.5
|
||||
tracker@1.0.2
|
||||
ui@1.0.2
|
||||
underscore-string-latest@0.0.0
|
||||
underscore@1.0.0
|
||||
webapp@1.0.2
|
||||
webapp@1.0.3
|
||||
|
||||
131
meteor/client/lib/menu.js
Normal file
131
meteor/client/lib/menu.js
Normal file
@@ -0,0 +1,131 @@
|
||||
var remote = require('remote');
|
||||
var app = remote.require('app');
|
||||
var Menu = remote.require('menu');
|
||||
var MenuItem = remote.require('menu-item');
|
||||
|
||||
// main.js
|
||||
var template = [
|
||||
{
|
||||
label: 'Kitematic',
|
||||
submenu: [
|
||||
{
|
||||
label: 'About Kitematic',
|
||||
selector: 'orderFrontStandardAboutPanel:'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Services',
|
||||
submenu: []
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Hide Kitematic',
|
||||
accelerator: 'Command+H',
|
||||
selector: 'hide:'
|
||||
},
|
||||
{
|
||||
label: 'Hide Others',
|
||||
accelerator: 'Command+Shift+H',
|
||||
selector: 'hideOtherApplications:'
|
||||
},
|
||||
{
|
||||
label: 'Show All',
|
||||
selector: 'unhideAllApplications:'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Quit',
|
||||
accelerator: 'Command+Q',
|
||||
click: function() { app.quit(); }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Undo',
|
||||
accelerator: 'Command+Z',
|
||||
selector: 'undo:'
|
||||
},
|
||||
{
|
||||
label: 'Redo',
|
||||
accelerator: 'Shift+Command+Z',
|
||||
selector: 'redo:'
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Cut',
|
||||
accelerator: 'Command+X',
|
||||
selector: 'cut:'
|
||||
},
|
||||
{
|
||||
label: 'Copy',
|
||||
accelerator: 'Command+C',
|
||||
selector: 'copy:'
|
||||
},
|
||||
{
|
||||
label: 'Paste',
|
||||
accelerator: 'Command+V',
|
||||
selector: 'paste:'
|
||||
},
|
||||
{
|
||||
label: 'Select All',
|
||||
accelerator: 'Command+A',
|
||||
selector: 'selectAll:'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'View',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Reload',
|
||||
accelerator: 'Command+R',
|
||||
click: function() { remote.getCurrentWindow().reloadIgnoringCache(); }
|
||||
},
|
||||
{
|
||||
label: 'Toggle DevTools',
|
||||
accelerator: 'Alt+Command+I',
|
||||
click: function() { remote.getCurrentWindow().toggleDevTools(); }
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Window',
|
||||
submenu: [
|
||||
{
|
||||
label: 'Minimize',
|
||||
accelerator: 'Command+M',
|
||||
selector: 'performMiniaturize:'
|
||||
},
|
||||
{
|
||||
label: 'Close',
|
||||
accelerator: 'Command+W',
|
||||
click: function () { remote.getCurrentWindow().hide(); }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Bring All to Front',
|
||||
selector: 'arrangeInFront:'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Help',
|
||||
submenu: []
|
||||
},
|
||||
];
|
||||
|
||||
var menu = Menu.buildFromTemplate(template);
|
||||
Menu.setApplicationMenu(menu);
|
||||
@@ -1,11 +1,11 @@
|
||||
try {
|
||||
moment = require('moment');
|
||||
gui = require('nw.gui');
|
||||
gui.App.clearCache();
|
||||
win = gui.Window.get();
|
||||
var nativeMenuBar = new gui.Menu({type: 'menubar'});
|
||||
nativeMenuBar.createMacBuiltin('Kitematic');
|
||||
win.menu = nativeMenuBar;
|
||||
// gui = require('nw.gui');
|
||||
// gui.App.clearCache();
|
||||
// win = gui.Window.get();
|
||||
// var nativeMenuBar = new gui.Menu({type: 'menubar'});
|
||||
// nativeMenuBar.createMacBuiltin('Kitematic');
|
||||
// win.menu = nativeMenuBar;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
1
meteor/client/stylesheets/theme.import.less
vendored
1
meteor/client/stylesheets/theme.import.less
vendored
@@ -10,6 +10,7 @@ html, body {
|
||||
font-size: @font-size-base;
|
||||
height: @window-height;
|
||||
.no-select();
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
html, body, div, span, object,
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
var remote = require('remote');
|
||||
var dialog = remote.require('dialog');
|
||||
|
||||
var getConfigVars = function ($form) {
|
||||
var configVars = {};
|
||||
$form.find('.env-var-pair').each(function () {
|
||||
@@ -39,10 +42,15 @@ Template.dashboard_apps_settings.events({
|
||||
return false;
|
||||
},
|
||||
'click .btn-delete-app': function () {
|
||||
var result = confirm("Are you sure you want to delete this app?");
|
||||
if (result === true) {
|
||||
AppUtil.remove(this._id);
|
||||
Router.go('dashboard_apps');
|
||||
}
|
||||
var appId = this._id;
|
||||
dialog.showMessageBox({
|
||||
message: 'Are you sure you want to delete this app?',
|
||||
buttons: ['Delete', 'Cancel']
|
||||
}, function (index) {
|
||||
if (index === 0) {
|
||||
AppUtil.remove(appId);
|
||||
Router.go('dashboard_apps');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
var remote = require('remote');
|
||||
|
||||
Template.dashboard_menu.events({
|
||||
'click .mac-close': function () {
|
||||
win.close();
|
||||
remote.getCurrentWindow().hide();
|
||||
},
|
||||
'click .mac-minimize': function () {
|
||||
win.minimize();
|
||||
remote.getCurrentWindow().minimize();
|
||||
},
|
||||
'mouseover .mac-window-options': function () {
|
||||
$('.mac-close i').show();
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<h5 id="picked-directory"></h5>
|
||||
<h6 id="picked-directory-error" class="error"></h6>
|
||||
<a onclick="trackLink('pick image folder')" href="#" id="btn-pick-directory" class="btn btn-positive btn-sm"><span class="typcn typcn-folder-open"></span> Select Folder</a>
|
||||
<input id="directory-picker" type="file" style="display: none;" nwdirectory />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
var remote = require('remote');
|
||||
var dialog = remote.require('dialog');
|
||||
|
||||
Template.modal_create_image.rendered = function () {
|
||||
$('#modal-create-image').bind('hidden.bs.modal', function () {
|
||||
@@ -9,27 +11,31 @@ Template.modal_create_image.rendered = function () {
|
||||
|
||||
Template.modal_create_image.events({
|
||||
'click #btn-pick-directory': function () {
|
||||
$('#directory-picker').click();
|
||||
},
|
||||
'change #directory-picker': function (e) {
|
||||
var $picker = $(e.currentTarget);
|
||||
var pickedDirectory = $picker.val();
|
||||
$('#picked-directory-error').html('');
|
||||
if (pickedDirectory) {
|
||||
$('#picked-directory').html('<strong>' + pickedDirectory + '<strong>');
|
||||
if (!Util.hasDockerfile(pickedDirectory)) {
|
||||
$('#picked-directory-error').html('Only directories with Dockerfiles are supported now.');
|
||||
$('#btn-create-image').attr('disabled', 'disabled');
|
||||
} else {
|
||||
$('#btn-create-image').removeAttr('disabled');
|
||||
dialog.showOpenDialog({properties: ['openDirectory']}, function (filenames) {
|
||||
if (!filenames) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
$('#picked-directory').html('');
|
||||
$('#btn-create-image').attr('disabled', 'disabled');
|
||||
}
|
||||
var directory = filenames[0];
|
||||
if (directory) {
|
||||
$('#picked-directory').html('<strong>' + directory + '<strong>');
|
||||
if (!Util.hasDockerfile(directory)) {
|
||||
$('#picked-directory-error').html('Only directories with Dockerfiles are supported now.');
|
||||
$('#btn-create-image').attr('disabled', 'disabled');
|
||||
} else {
|
||||
Session.set('createImagePickedDirectory', directory);
|
||||
$('#btn-create-image').removeAttr('disabled');
|
||||
}
|
||||
} else {
|
||||
$('#picked-directory').html('');
|
||||
$('#btn-create-image').attr('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
},
|
||||
'click #btn-create-image': function () {
|
||||
var directory = $('#directory-picker').val();
|
||||
var directory = Session.get('createImagePickedDirectory');
|
||||
if (!directory) {
|
||||
return;
|
||||
}
|
||||
$('#directory-picker').val('');
|
||||
$('#picked-directory-error').html('');
|
||||
$('#picked-directory').html('');
|
||||
|
||||
@@ -62,7 +62,6 @@
|
||||
<h5><strong>{{this.originPath}}</strong></h5>
|
||||
<h6 id="picked-directory-error" class="error"></h6>
|
||||
<a onclick="trackLink('change build directory')" href="#" id="btn-pick-directory" class="btn btn-positive btn-sm"><span class="typcn typcn-folder-open"></span> Change Directory</a>
|
||||
<input id="directory-picker" type="file" style="display: none;" nwdirectory />
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
var remote = require('remote');
|
||||
var dialog = remote.require('dialog');
|
||||
|
||||
Template.dashboard_images_settings.events({
|
||||
'click .btn-delete-image': function () {
|
||||
var result = confirm("Are you sure you want to delete this image?");
|
||||
if (result === true) {
|
||||
var imageId = this._id;
|
||||
var imageId = this._id;
|
||||
dialog.showMessageBox({
|
||||
message: 'Are you sure you want to delete this image?',
|
||||
buttons: ['Delete', 'Cancel']
|
||||
}, function (index) {
|
||||
if (index !== 0) {
|
||||
return;
|
||||
}
|
||||
var image = Images.findOne(imageId);
|
||||
var app = Apps.findOne({imageId: imageId});
|
||||
if (!app) {
|
||||
@@ -23,26 +31,27 @@ Template.dashboard_images_settings.events({
|
||||
$('#error-delete-image').html('<small class="error">This image is currently being used by <a href="/apps/' + app.name + '">' + app.name + '</a>.</small>');
|
||||
$('#error-delete-image').fadeIn();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
'click #btn-pick-directory': function () {
|
||||
$('#directory-picker').click();
|
||||
},
|
||||
'change #directory-picker': function (e) {
|
||||
var imageId = this._id;
|
||||
var $picker = $(e.currentTarget);
|
||||
var pickedDirectory = $picker.val();
|
||||
$('#picked-directory-error').html('');
|
||||
if (pickedDirectory) {
|
||||
if (!Util.hasDockerfile(pickedDirectory)) {
|
||||
$('#picked-directory-error').html('Only directories with Dockerfiles are supported now.');
|
||||
} else {
|
||||
Images.update(imageId, {
|
||||
$set: {
|
||||
originPath: pickedDirectory
|
||||
}
|
||||
});
|
||||
dialog.showOpenDialog({properties: ['openDirectory']}, function (filenames) {
|
||||
if (!filenames) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var directory = filenames[0];
|
||||
if (directory) {
|
||||
if (!Util.hasDockerfile(directory)) {
|
||||
$('#picked-directory-error').html('Only directories with Dockerfiles are supported now.');
|
||||
} else {
|
||||
Images.update(imageId, {
|
||||
$set: {
|
||||
originPath: directory
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"packages": {
|
||||
"bootstrap3-less": {},
|
||||
"iron-router": {},
|
||||
"handlebar-helpers": {},
|
||||
"underscore-string-latest": {},
|
||||
"collection-helpers": {},
|
||||
"fast-render": {},
|
||||
"iron-router-ga": {}
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
{
|
||||
"meteor": {},
|
||||
"dependencies": {
|
||||
"basePackages": {
|
||||
"bootstrap3-less": {},
|
||||
"iron-router": {},
|
||||
"handlebar-helpers": {},
|
||||
"underscore-string-latest": {},
|
||||
"collection-helpers": {},
|
||||
"fast-render": {},
|
||||
"iron-router-ga": {}
|
||||
},
|
||||
"packages": {
|
||||
"bootstrap3-less": {
|
||||
"git": "https://github.com/simison/bootstrap3-less",
|
||||
"tag": "v0.2.1",
|
||||
"commit": "dc94a51ed00d7de6d6f2b6d65107a876d849ad61"
|
||||
},
|
||||
"iron-router": {
|
||||
"git": "https://github.com/EventedMind/iron-router.git",
|
||||
"tag": "v0.8.2",
|
||||
"commit": "05415a8891ea87a00fb1e2388585f2ca5a38e0da"
|
||||
},
|
||||
"handlebar-helpers": {
|
||||
"git": "https://github.com/raix/Meteor-handlebar-helpers.git",
|
||||
"tag": "v0.1.1",
|
||||
"commit": "0b407ab65e7c1ebd53d71aef0de2e2c1d21a597c"
|
||||
},
|
||||
"underscore-string-latest": {
|
||||
"git": "https://github.com/TimHeckel/meteor-underscore-string.git",
|
||||
"tag": "v2.3.3",
|
||||
"commit": "4a5d70eee48fbd90a6e6fc78747250d704a0b3bb"
|
||||
},
|
||||
"collection-helpers": {
|
||||
"git": "https://github.com/dburles/meteor-collection-helpers.git",
|
||||
"tag": "v0.3.1",
|
||||
"commit": "eff6c859cd91eae324f6c99ab755992d0f271d91"
|
||||
},
|
||||
"fast-render": {
|
||||
"git": "https://github.com/arunoda/meteor-fast-render.git",
|
||||
"tag": "v1.0.0",
|
||||
"commit": "acbc04982025fe78cebb8865b5a04689741d4b0b"
|
||||
},
|
||||
"iron-router-ga": {
|
||||
"git": "https://github.com/reywood/meteor-iron-router-ga.git",
|
||||
"tag": "v0.2.5",
|
||||
"commit": "ede54c4633f9a54fddd5c431202a88284df2a932"
|
||||
},
|
||||
"iron-layout": {
|
||||
"git": "https://github.com/EventedMind/iron-layout.git",
|
||||
"tag": "v0.2.0",
|
||||
"commit": "4a2d53e35ba036b0c189c7ceca34be494d4c6c97"
|
||||
},
|
||||
"blaze-layout": {
|
||||
"git": "https://github.com/EventedMind/blaze-layout.git",
|
||||
"tag": "v0.2.5",
|
||||
"commit": "273e3ab7d005d91a1a59c71bd224533b4dae2fbd"
|
||||
},
|
||||
"iron-core": {
|
||||
"git": "https://github.com/EventedMind/iron-core.git",
|
||||
"tag": "v0.2.0",
|
||||
"commit": "0e48b5dc50d03f01025b7b900fb5ce2f13d52cad"
|
||||
},
|
||||
"iron-dynamic-template": {
|
||||
"git": "https://github.com/EventedMind/iron-dynamic-template.git",
|
||||
"tag": "v0.2.1",
|
||||
"commit": "4dd1185c4d9d616c9abdb3f33e4a7d5a88db7e18"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
package.json
16
package.json
@@ -1,19 +1,7 @@
|
||||
{
|
||||
"name": "Kitematic",
|
||||
"main": "index.html",
|
||||
"node-remote": "<local>",
|
||||
"version": "0.1.0",
|
||||
"window": {
|
||||
"show": false,
|
||||
"toolbar": false,
|
||||
"frame": false,
|
||||
"width": 800,
|
||||
"height": 600,
|
||||
"resizable": false
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.11.13"
|
||||
},
|
||||
"main": "index.js",
|
||||
"version": "0.2.0",
|
||||
"dependencies": {
|
||||
"async": "^0.9.0",
|
||||
"chokidar": "git+https://github.com/usekite/chokidar.git",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $DIR/colors.sh
|
||||
|
||||
BASE=$DIR/..
|
||||
pushd $BASE/meteor
|
||||
|
||||
$BASE/script/setup.sh
|
||||
|
||||
NPM="$BASE/cache/node/bin/npm"
|
||||
|
||||
if ! type "mrt" > /dev/null 2>&1; then
|
||||
cecho "meteorite not found, install using npm install meteorite -g" $red
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf ../bundle
|
||||
|
||||
$NPM install demeteorizer -g
|
||||
|
||||
cecho "-----> Building bundle from Meteor app, this may take a few minutes..." $blue
|
||||
$BASE/cache/node/bin/demeteorizer -o ../bundle
|
||||
|
||||
cd ../bundle
|
||||
|
||||
cecho "-----> Installing bundle npm packages." $blue
|
||||
$NPM install
|
||||
|
||||
cecho "-----> Removing unnecessary node_modules" $blue
|
||||
rm -rf ./programs/ctl/node_modules
|
||||
|
||||
cecho "Bundle created." $green
|
||||
|
||||
popd
|
||||
@@ -6,45 +6,57 @@ source $DIR/colors.sh
|
||||
source $DIR/versions.sh
|
||||
|
||||
BASE=$DIR/..
|
||||
NPM="$BASE/cache/node/bin/npm"
|
||||
|
||||
pushd $BASE/meteor
|
||||
|
||||
$BASE/script/setup.sh
|
||||
rm -rf ../bundle
|
||||
|
||||
cecho "-----> Building bundle from Meteor app, this may take a few minutes..." $blue
|
||||
meteor bundle --directory ../bundle
|
||||
|
||||
cd ../bundle
|
||||
|
||||
cecho "-----> Installing bundle npm packages." $blue
|
||||
pushd programs/server
|
||||
$NPM install
|
||||
popd
|
||||
|
||||
cecho "Bundle created." $green
|
||||
|
||||
popd
|
||||
|
||||
pushd $BASE
|
||||
|
||||
if [ ! -d bundle ]; then
|
||||
cecho "No bundle, run script/bundle.sh first." $red
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf dist/osx/Kitematic.app
|
||||
rm -rf dist/osx/Kitematic.zip
|
||||
mkdir -p dist/osx/
|
||||
|
||||
cecho "-----> Creating Kitematic.app..." $blue
|
||||
find cache/node-webkit -name "debug\.log" -print0 | xargs -0 rm -rf
|
||||
cp -R cache/node-webkit/node-webkit.app dist/osx/
|
||||
mv dist/osx/node-webkit.app dist/osx/Kitematic.app
|
||||
mkdir -p dist/osx/Kitematic.app/Contents/Resources/app.nw
|
||||
find cache/atom-shell -name "debug\.log" -print0 | xargs -0 rm -rf
|
||||
cp -R cache/atom-shell/Atom.app dist/osx/
|
||||
mv dist/osx/Atom.app dist/osx/Kitematic.app
|
||||
mkdir -p dist/osx/Kitematic.app/Contents/Resources/app
|
||||
|
||||
cecho "-----> Copying meteor bundle into Kitematic.app..." $blue
|
||||
cp -R bundle dist/osx/Kitematic.app/Contents/Resources/app.nw/
|
||||
cp -R bundle dist/osx/Kitematic.app/Contents/Resources/app/
|
||||
|
||||
cecho "-----> Copying node-webkit app into Kitematic.app..." $blue
|
||||
cp index.html dist/osx/Kitematic.app/Contents/Resources/app.nw/
|
||||
cp index.js dist/osx/Kitematic.app/Contents/Resources/app.nw/
|
||||
cp package.json dist/osx/Kitematic.app/Contents/Resources/app.nw/
|
||||
cp -R node_modules dist/osx/Kitematic.app/Contents/Resources/app.nw/
|
||||
|
||||
$DIR/setup.sh
|
||||
cp index.js dist/osx/Kitematic.app/Contents/Resources/app/
|
||||
cp package.json dist/osx/Kitematic.app/Contents/Resources/app/
|
||||
cp -R node_modules dist/osx/Kitematic.app/Contents/Resources/app/
|
||||
|
||||
cecho "-----> Copying binary files to Kitematic.app" $blue
|
||||
mkdir -p dist/osx/Kitematic.app/Contents/Resources/app.nw/resources
|
||||
cp -v resources/* dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/ || :
|
||||
mkdir -p dist/osx/Kitematic.app/Contents/Resources/app/resources
|
||||
cp -v resources/* dist/osx/Kitematic.app/Contents/Resources/app/resources/ || :
|
||||
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/$BOOT2DOCKER_CLI_FILE
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/$COCOASUDO_FILE
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/install
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/terminal
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/unison
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app.nw/resources/node
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app/resources/$BOOT2DOCKER_CLI_FILE
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app/resources/$COCOASUDO_FILE
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app/resources/install
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app/resources/terminal
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app/resources/unison
|
||||
chmod +x dist/osx/Kitematic.app/Contents/Resources/app/resources/node
|
||||
|
||||
if [ -f $DIR/sign.sh ]; then
|
||||
cecho "-----> Signing app file...." $blue
|
||||
@@ -56,6 +68,10 @@ pushd dist/osx
|
||||
ditto -c -k --sequesterRsrc --keepParent Kitematic.app Kitematic.zip
|
||||
popd
|
||||
|
||||
VERSION=$(node -pe 'JSON.parse(process.argv[1]).version' "$(cat package.json)")
|
||||
cecho "Updating Info.plist version to $VERSION"
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion 0.3.0" $BASE/dist/osx/Kitematic.app/Contents/Info.plist
|
||||
|
||||
cecho "Done." $green
|
||||
cecho "Kitematic app available at dist/osx/Kitematic.app" $green
|
||||
cecho "Kitematic zip distribution available at dist/osx/Kitematic.zip" $green
|
||||
|
||||
@@ -7,10 +7,7 @@ export ROOT_URL=https://localhost:3000
|
||||
export DOCKER_HOST=http://192.168.59.103
|
||||
export DOCKER_PORT=2375
|
||||
|
||||
#export METEOR_SETTINGS=`cat $BASE/meteor/settings_dev.json`
|
||||
#echo $METEOR_SETTINGS
|
||||
|
||||
cd $BASE/meteor
|
||||
exec 3< <(mrt --settings $BASE/meteor/settings_dev.json)
|
||||
exec 3< <(meteor)
|
||||
sed '/App running at/q' <&3 ; cat <&3 &
|
||||
NODE_ENV=development $BASE/cache/node-webkit/node-webkit.app/Contents/MacOS/node-webkit $BASE
|
||||
NODE_ENV=development $BASE/cache/atom-shell/Atom.app/Contents/MacOS/Atom $BASE
|
||||
|
||||
@@ -67,6 +67,10 @@ chmod +x $BOOT2DOCKER_CLI_FILE
|
||||
popd
|
||||
|
||||
NPM="$BASE/cache/node/bin/npm"
|
||||
$NPM install
|
||||
|
||||
export npm_config_disturl=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist
|
||||
export npm_config_target=0.16.0
|
||||
export npm_config_arch=ia32
|
||||
HOME=~/.atom-shell-gyp $NPM install
|
||||
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user