From f112b0bf0318fe68de666f018e5d74bbc248c1cc Mon Sep 17 00:00:00 2001 From: Dick Choi Date: Mon, 17 Oct 2016 02:16:28 +0900 Subject: [PATCH] override meta.js --- browser/lib/customMeta.js | 4 ++++ browser/main/index.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 browser/lib/customMeta.js diff --git a/browser/lib/customMeta.js b/browser/lib/customMeta.js new file mode 100644 index 00000000..b2ed8123 --- /dev/null +++ b/browser/lib/customMeta.js @@ -0,0 +1,4 @@ +import CodeMirror from 'codemirror' +import _ from 'lodash' + +CodeMirror.modeInfo.push({name: 'Stylus', mime: 'text/x-styl', mode: 'stylus', ext: ['styl']}) diff --git a/browser/main/index.js b/browser/main/index.js index 5eeb89f9..1bef4eeb 100644 --- a/browser/main/index.js +++ b/browser/main/index.js @@ -7,6 +7,7 @@ require('!!style!css!stylus?sourceMap!./global.styl') import { Router, Route, IndexRoute, IndexRedirect, hashHistory } from 'react-router' import { syncHistoryWithStore } from 'react-router-redux' require('./lib/ipcClient') +require('../lib/customMeta') const electron = require('electron') @@ -85,6 +86,8 @@ ReactDOM.render(( ipcRenderer.send('update-check', 'check-update') window.addEventListener('online', function () { - ipcRenderer.send('update-check', 'check-update') + if (!store.getState().status.updateReady) { + ipcRenderer.send('update-check', 'check-update') + } }) })