Skip to content

Commit 8e64abc

Browse files
committed
cleanup code
1 parent 52df793 commit 8e64abc

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

finder.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const electron = require('electron')
22
const app = electron.app
33
const Menu = electron.Menu
4-
const ipcMain = electron.ipcMain
5-
const path = require('path')
64

75
var finderWindow = null
86

@@ -24,4 +22,3 @@ app.on('ready', function () {
2422
finderWindow.hide()
2523
})
2624
})
27-

gruntfile.js

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ const archiver = require('archiver')
55
const fs = require('fs')
66

77
module.exports = function (grunt) {
8-
9-
// Project configuration.
108
grunt.initConfig({
119
pkg: grunt.file.readJSON('package.json'),
1210
auth_code: grunt.file.readJSON('secret/auth_code.json'),
@@ -25,38 +23,45 @@ module.exports = function (grunt) {
2523
}
2624
}
2725
})
26+
2827
grunt.loadNpmTasks('grunt-electron-installer')
2928

3029
grunt.registerTask('compile', function () {
3130
var done = this.async()
3231
var execPath = path.join('node_modules', '.bin', 'webpack') + ' --config webpack.config.production.js'
3332
grunt.log.writeln(execPath)
34-
var compileProcess = ChildProcess.exec(execPath,
33+
ChildProcess.exec(execPath,
3534
{
3635
env: Object.assign({}, process.env, {
3736
BABEL_ENV: 'production'
3837
})
39-
}, function (err, stdout, stderr) {
40-
grunt.log.writeln(stdout)
41-
if (err) {
42-
grunt.log.writeln(err)
43-
grunt.log.writeln(stderr)
44-
done(false)
45-
return
38+
},
39+
function (err, stdout, stderr) {
40+
grunt.log.writeln(stdout)
41+
42+
if (err) {
43+
grunt.log.writeln(err)
44+
grunt.log.writeln(stderr)
45+
done(false)
46+
return
47+
}
48+
done()
4649
}
47-
done()
48-
})
50+
)
4951
})
5052

5153
grunt.registerTask('zip', function (platform) {
5254
var done = this.async()
5355
var archive = archiver.create('zip', {})
5456
switch (platform) {
5557
case 'win':
56-
archive.file(path.join('dist/Setup.exe'), { name:'Boostnote-installer-win32-x64.exe' })
58+
archive.file(path.join('dist/Setup.exe'), {
59+
name: 'Boostnote-installer-win32-x64.exe'
60+
})
61+
break
5762
default:
5863
done()
59-
return
64+
break
6065
}
6166
archive.finalize()
6267
var writeStream = fs.createWriteStream(path.join('dist/Boostnote-installer-win32-x64.zip'))

hotkey.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
const electron = require('electron')
22
const app = electron.app
3-
const Menu = electron.Menu
43
const ipc = electron.ipcMain
54
const globalShortcut = electron.globalShortcut
65
const jetpack = require('fs-jetpack')
7-
const path = require('path')
86
const mainWindow = require('./atom-lib/main-window')
97
const nodeIpc = require('@rokt33r/node-ipc')
108

webpack.config.production.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var opt = {
1212
publicPath: 'http://localhost:8080/assets/'
1313
}
1414

15-
config = {
15+
var config = {
1616
module: {
1717
loaders: [
1818
{

0 commit comments

Comments
 (0)