Skip to content

Commit 79a285b

Browse files
authored
Merge pull request #270 from manosim/v2
Gitify V2
2 parents 41d2f6d + 2cb5de0 commit 79a285b

File tree

108 files changed

+11441
-3410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11441
-3410
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
browser: true,
44
es6: true,
55
node: true,
6-
mocha: true
6+
jest: true,
7+
jasmine: true,
78
},
89
"parserOptions": {
910
"ecmaVersion": 6,

.sass-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rules:
1616
exclude:
1717
- src
1818
- transform
19-
no-ids: 2
19+
no-ids: 0
2020
no-important: 2
2121
no-transition-all: 0
2222
no-vendor-prefixes: 0

.travis.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
language: node_js
22

33
node_js:
4-
- '5'
4+
- '6.10.3'
55

66
cache:
7+
yarn: true
78
directories:
8-
- node_modules
9-
10-
install:
11-
- npm install
12-
13-
before_script:
14-
- npm run build
9+
- "node_modules"
1510

1611
script:
17-
- npm test
12+
- yarn test -- --runInBand
1813

1914
after_success:
2015
- bash <(curl -s https://codecov.io/bash)

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible Node.js debug attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"program": "${workspaceRoot}/main.js"
12+
},
13+
{
14+
"type": "node",
15+
"request": "attach",
16+
"name": "Attach to Process",
17+
"address": "localhost",
18+
"port": 5858
19+
}
20+
]
21+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Emmanouil Konstantinidis
3+
Copyright (c) 2017 Emmanouil Konstantinidis
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@
55
![Gitify](images/press.png)
66

77

8-
### Version 1.0.0 is now out!
9-
10-
> Gitify finally reaches version **1.0.0**. The app has been rewritten from scratch using React v15, Redux, Bootstrap 4 and more. This allows me to prepare the surface for more features (GitHub Enterprise etc). Unfortunately, due to a change in the auto-update package API, you will have **to download the update manually**. This is now fixed and you won't have to download any updates manually again. Finally the user settings will be reset with the new version. Hope you like it and feel free to give me some feedback!
11-
12-
> Cheers,
13-
14-
> Manos
15-
16-
178
### Download
189
You can download Gitify for **free** from either the website [www.gitify.io](http://www.gitify.io/) or from the GitHub repository [releases](https://github.com/manosim/gitify/releases) page.
1910

@@ -28,10 +19,10 @@ Gitify currently only supports OS X.
2819

2920
### Prerequisites
3021

22+
- Node 6+
3123
- [Electron](http://electron.atom.io/)
3224
- [React](https://facebook.github.io/react/)
33-
- [Webpack](https://webpack.github.io/)
34-
- [NPM](https://www.npmjs.com/)
25+
- [Gulp](https://www.gulpjs.com)
3526

3627

3728
### Installation
@@ -64,16 +55,13 @@ To publish a new version, you also need to codesign the app running `npm run cod
6455

6556

6657
### Tests
67-
There are 2 linters for `js` & `scss` and unit tests with `mocha`.
68-
69-
// Run all tests
70-
npm run test
58+
There are 2 linters for `js` & `scss` and unit tests with `jest`.
7159

7260
// Run only unit tests
73-
npm run mocha
61+
npm run jest
7462

75-
// Run unit tests with coverage
76-
npm run coverage
63+
// Run linter & unit tests with coverage
64+
npm run test
7765

7866
### FAQ
7967

electron/app-menu-template.js

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
const { shell } = require('electron');
2+
3+
const appMenuTemplate = [
4+
{
5+
label: 'Edit',
6+
submenu: [
7+
{
8+
role: 'cut'
9+
},
10+
{
11+
role: 'copy'
12+
},
13+
{
14+
role: 'paste'
15+
},
16+
{
17+
role: 'delete'
18+
},
19+
{
20+
role: 'selectall'
21+
}
22+
]
23+
},
24+
{
25+
label: 'View',
26+
submenu: [
27+
{
28+
label: 'Reload',
29+
accelerator: 'CmdOrCtrl+R',
30+
click (item, focusedWindow) {
31+
if (focusedWindow) focusedWindow.reload();
32+
}
33+
},
34+
{
35+
label: 'Toggle Developer Tools',
36+
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
37+
click (item, focusedWindow) {
38+
if (focusedWindow) focusedWindow.webContents.toggleDevTools();
39+
}
40+
},
41+
{
42+
type: 'separator'
43+
},
44+
{
45+
role: 'resetzoom'
46+
},
47+
{
48+
role: 'zoomin'
49+
},
50+
{
51+
role: 'zoomout'
52+
},
53+
{
54+
type: 'separator'
55+
},
56+
{
57+
role: 'togglefullscreen'
58+
}
59+
]
60+
},
61+
{
62+
role: 'window',
63+
submenu: [
64+
{
65+
role: 'minimize'
66+
},
67+
{
68+
role: 'close'
69+
}
70+
]
71+
},
72+
{
73+
role: 'help',
74+
submenu: [
75+
{
76+
label: 'GitHub Repository',
77+
click () { shell.openExternal('https://github.com/manosim/gitify'); }
78+
},
79+
{
80+
label: 'Visit Website',
81+
click () { shell.openExternal('http://www.gitify.io'); }
82+
}
83+
]
84+
}
85+
];
86+
87+
if (process.platform === 'darwin') {
88+
appMenuTemplate.unshift({
89+
label: 'Gitify',
90+
submenu: [
91+
{
92+
role: 'about'
93+
},
94+
{
95+
type: 'separator'
96+
},
97+
{
98+
label: 'Preferences',
99+
accelerator: process.platform === 'darwin' ? 'Command+,' : 'Ctrl+,',
100+
click (item, focusedWindow) {
101+
if (focusedWindow) focusedWindow.webContents.send('toggle-settings');
102+
}
103+
},
104+
{
105+
type: 'separator'
106+
},
107+
{
108+
role: 'hide'
109+
},
110+
{
111+
role: 'hideothers'
112+
},
113+
{
114+
role: 'unhide'
115+
},
116+
{
117+
type: 'separator'
118+
},
119+
{
120+
role: 'quit'
121+
}
122+
]
123+
});
124+
125+
// Window menu.
126+
appMenuTemplate[3].submenu = [
127+
{
128+
label: 'Close',
129+
accelerator: 'CmdOrCtrl+W',
130+
role: 'close'
131+
},
132+
{
133+
label: 'Minimize',
134+
accelerator: 'CmdOrCtrl+M',
135+
role: 'minimize'
136+
},
137+
{
138+
label: 'Zoom',
139+
role: 'zoom'
140+
},
141+
{
142+
type: 'separator'
143+
},
144+
{
145+
label: 'Bring All to Front',
146+
role: 'front'
147+
}
148+
];
149+
}
150+
151+
module.exports = appMenuTemplate;

gulpfile.js

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,23 @@
1-
var assign = require('lodash.assign');
2-
var babelify = require('babelify');
3-
var browserify = require('browserify');
4-
var buffer = require('vinyl-buffer');
5-
var gulp = require('gulp');
6-
var gutil = require('gulp-util');
7-
var sass = require('gulp-sass');
8-
var source = require('vinyl-source-stream');
9-
var uglify = require('gulp-uglify');
10-
var watchify = require('watchify');
1+
const gulp = require('gulp');
2+
const sass = require('gulp-sass');
113

12-
var options = {
13-
browserifyOpts: {
14-
entries: './src/js/app.js',
15-
debug: true
16-
},
17-
jsDest: 'dist/js'
18-
};
19-
20-
var bundler = browserify(options.browserifyOpts);
21-
22-
gulp.task('build:js', function () {
23-
return bundler
24-
.transform(babelify)
25-
.bundle()
26-
.pipe(source('app.js'))
27-
.pipe(buffer())
28-
.pipe(uglify())
29-
.pipe(gulp.dest(options.jsDest));
30-
});
31-
32-
gulp.task('watch:js', function () {
33-
var watcherOpts = assign({}, watchify.args, options.browserifyOpts);
34-
var watcher = watchify(browserify(watcherOpts)).transform(babelify);
35-
36-
function bundle() {
37-
return watcher
38-
.bundle()
39-
// log errors if they happen
40-
.on('error', gutil.log.bind(gutil, 'Browserify Error'))
41-
.pipe(source('app.js'))
42-
.pipe(buffer())
43-
.pipe(gulp.dest(options.jsDest));
44-
}
45-
46-
watcher.on('update', bundle); // on any dep update, runs the bundler
47-
watcher.on('log', gutil.log); // output build logs to terminal
48-
49-
return bundle();
50-
});
51-
52-
gulp.task('build:scss', function () {
4+
gulp.task('build:scss', () => {
535
return gulp.src('./src/scss/app.scss')
546
.pipe(sass().on('error', sass.logError))
557
.pipe(gulp.dest('./dist/css'));
568
});
579

58-
gulp.task('watch:scss', function () {
10+
gulp.task('watch:scss', () => {
5911
gulp.watch('./src/scss/app.scss', ['build:scss']);
6012
});
6113

62-
gulp.task('copy:fonts', function () {
14+
gulp.task('copy:fonts', () => {
6315
return gulp.src([
6416
'./node_modules/font-awesome/fonts/*.+(eot|svg|ttf|woff|woff2|otf)',
6517
'./node_modules/octicons/build/font/*.+(ttf|eot|svg|ttf|woff|woff2)',
6618
])
6719
.pipe(gulp.dest('./dist/fonts'));
6820
});
6921

70-
gulp.task('apply-prod-environment', function() {
71-
process.env.NODE_ENV = 'production';
72-
});
73-
74-
gulp.task('watch', ['watch:js', 'watch:scss']);
75-
gulp.task('build', ['copy:fonts', 'build:js', 'build:scss']);
76-
gulp.task('release', ['apply-prod-environment', 'build']);
77-
gulp.task('default', ['build']);
22+
gulp.task('watch', ['watch:scss']);
23+
gulp.task('build', ['copy:fonts', 'build:scss']);

images/app-icon.icns

598 KB
Binary file not shown.
-28 KB
Binary file not shown.
-19.6 KB
Binary file not shown.

images/gitify-logo-outline-dark.png

-43 KB
Binary file not shown.

images/gitify-logo-outline-light.png

-1.02 MB
Binary file not shown.

images/logo-hor-white.png

-7.18 KB
Binary file not shown.

images/tray-active.png

0 Bytes
Loading

images/[email protected]

535 Bytes
Loading

images/tray-idleTemplate.png

626 Bytes
Loading

images/[email protected]

444 Bytes
Loading

0 commit comments

Comments
 (0)