Skip to content

Commit

Permalink
mv for asar
Browse files Browse the repository at this point in the history
  • Loading branch information
ppot committed Feb 15, 2017
1 parent 0df3286 commit 70e38b1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ const fileUriToPath = require('file-uri-to-path');
const isDev = require('electron-is-dev');

// Ours
const KeymapManager = require('../keymaps/keymap-manager');
const Keymap = resolve(__dirname, '../keymaps/darwin.json');
console.log(Keymap);
const KeymapManager = require('./keymaps/keymap-manager');
const AutoUpdater = require('./auto-updater');
const toElectronBackgroundColor = require('./utils/to-electron-background-color');
const AppMenu = require('./menus/menu');
Expand Down
File renamed without changes.
11 changes: 6 additions & 5 deletions keymaps/keymap-manager.js → app/keymaps/keymap-manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const {readFileSync} = require('fs');
const {resolve} = require('path');
// const CommandRegistry = require('../keymaps/command-registry');

module.exports = class KeymapManager {
constructor() {
Expand All @@ -9,12 +8,14 @@ module.exports = class KeymapManager {
this.keys = {};
const path = () => {
switch (this.platform) {
case 'darwin': return resolve('keymaps/darwin.json');
case 'win32': return resolve('keymaps/win32.json');
case 'linux': return resolve('keymaps/linux.json');
default: return resolve('keymaps/darwin.json');
case 'darwin': return resolve(__dirname, 'darwin.json');
case 'win32': return resolve(__dirname, 'win32.json');
case 'linux': return resolve(__dirname, 'linux.json');
default: return resolve(__dirname, 'darwin.json');
}
};

console.log(path());

try {
const commands = JSON.parse(readFileSync(path()));
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Provider} from 'react-redux';
import React from 'react';
import {render} from 'react-dom';

import KeymapManager from '../keymaps/keymap-manager';
import KeymapManager from '../app/keymaps/keymap-manager';
import rpc from './rpc';
import init from './actions/index';
import * as config from './utils/config';
Expand Down

0 comments on commit 70e38b1

Please sign in to comment.