From fcba707491c2de6c4010847891ce651d433f7613 Mon Sep 17 00:00:00 2001 From: Daniel Bayley <daniel.bayley@me.com> Date: Sun, 11 Dec 2016 17:50:08 +0000 Subject: [PATCH] Tidy up Convert leading tabs to spaces. --- .editorconfig | 18 ----------- .gitignore | 4 +-- README.md | 5 +++- index.coffee | 70 +++++++++++++++++++++---------------------- menus/gitkraken.cson | 26 ++++++++-------- package.json | 15 +++++----- styles/gitkraken.less | 7 ++--- 7 files changed, 64 insertions(+), 81 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 5820b9c..0000000 --- a/.editorconfig +++ /dev/null @@ -1,18 +0,0 @@ -root = true - -[*] -end_of_line = LF -charset = utf-8 - -indent_style = tab -indent_size = 2 - -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false - -[{*.md,package.json}] -indent_style = space -indent_size = 2 diff --git a/.gitignore b/.gitignore index 8c60eb4..ecddf95 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# OS X +# macOS .DS_Store # npm node_modules/ -*npm-debug* +npm* diff --git a/README.md b/README.md index 9cdf11e..0bab797 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![badge][apm]][package] [![badge][chat]][#slack] +[![badge][chat-gk]][#slack-gk] [Atom] + [GitKraken] ==================== @@ -22,7 +23,9 @@ License [atom]: https://atom.io [apm]: https://img.shields.io/apm/v/gitkraken.svg?style=flat-square [package]: https://atom.io/packages/gitkraken -[chat]: https://img.shields.io/badge/chat-atom.io%20slack-ff69b4.svg?style=flat-square +[chat]: https://img.shields.io/badge/slack-atom.io-9FD4A9.svg?style=flat-square [#slack]: https://atom-slack.herokuapp.com +[chat-gk]: https://img.shields.io/badge/slack-gitkraken-379388.svg?style=flat-square +[#slack-gk]: https://slack.gitkraken.com [gitkraken]: http://gitkraken.com diff --git a/index.coffee b/index.coffee index ba9574d..bd3ae96 100644 --- a/index.coffee +++ b/index.coffee @@ -3,48 +3,48 @@ SubAtom = require 'sub-atom' module.exports = - #os: process.platform - #timeout: - #timeout: 10000 - #killSignal: 'SIGKILL' + #os: process.platform + #timeout: + #timeout: 10000 + #killSignal: 'SIGKILL' - project: atom.project.getDirectories()[0] ? path: process.cwd() - tmp: '/tmp/GitKraken.json' + project: atom.project.getDirectories()[0] ? path: process.cwd() + tmp: '/tmp/GitKraken.json' - id: 'com.axosoft.GitKraken' - selector: '[class^=status-bar] .git-branch' + id: 'com.axosoft.GitKraken' + selector: '[class^=status-bar] .git-branch' - subs: new SubAtom + subs: new SubAtom #------------------------------------------------------------------------------- - activate: -> + activate: -> - @subs.add atom.commands.add 'atom-workspace', - 'gitkraken:release': => @open @project + @subs.add atom.commands.add 'atom-workspace', + 'gitkraken:release': => @open @project - @subs.add atom.packages.onDidActivateInitialPackages => - @subs.add 'status-bar','click', @selector, ({altKey, shiftKey}) => - @open @project if altKey or shiftKey + @subs.add atom.packages.onDidActivateInitialPackages => + @subs.add 'status-bar','click', @selector, ({altKey, shiftKey}) => + @open @project if altKey or shiftKey #------------------------------------------------------------------------------- - open: ({path}) -> - if atom.config.get 'gitkraken.singleInstance' - exec "pkill GitKraken; sleep .1 && open -Fb #{@id} --args -p '#{path}'" #, @timeout - else - projects = {} - try - projects = require @tmp - execSync "ps #{projects[path]} | grep -q GitKraken && - open -b #{@id} --args -p '#{path}'" - catch - pid = execSync "open -nb #{@id} --args -p '#{path}' & echo $!" - projects[path] = (parseInt pid) + 1 - writeFile @tmp, JSON.stringify projects - - window.addEventListener 'beforeunload', -> - exec "kill #{projects[path]}" + open: ({path}) -> + if atom.config.get 'gitkraken.singleInstance' + exec "pkill GitKraken; sleep .1 && open -Fb #{@id} --args -p '#{path}'" #, @timeout + else + projects = {} + try + projects = require @tmp + execSync "ps #{projects[path]} | grep -q GitKraken && + open -b #{@id} --args -p '#{path}'" + catch + pid = execSync "open -nb #{@id} --args -p '#{path}' & echo $!" + projects[path] = (parseInt pid) + 1 + writeFile @tmp, JSON.stringify projects + + window.addEventListener 'beforeunload', -> + exec "kill #{projects[path]}" #------------------------------------------------------------------------------- - deactivate: -> - @subs.dispose() - window.removeEventListener 'beforeunload' - unlink @tmp + deactivate: -> + @subs.dispose() + window.removeEventListener 'beforeunload' + unlink @tmp diff --git a/menus/gitkraken.cson b/menus/gitkraken.cson index 523ac2b..011b72c 100644 --- a/menus/gitkraken.cson +++ b/menus/gitkraken.cson @@ -1,15 +1,15 @@ menu: [ - label: "Packages" - submenu: [ - label: "Open Project in GitKraken" - #submenu: [ - #label: 'Open Project' #Release - command: 'gitkraken:release' -] ] #] + label: "Packages" + submenu: [ + label: "Open Project in GitKraken" + #submenu: [ + #label: 'Open Project' #Release + command: 'gitkraken:release' +] ] #] 'context-menu': - '.tree-view .header .icon-repo, - .header .tree-view-git-status, - [class^="status-bar"] .git-branch': [ #.platform-darwin - label: "Open Project in GitKraken" - command: 'gitkraken:release' - ] + '.tree-view .header .icon-repo, + .header .tree-view-git-status, + [class^="status-bar"] .git-branch': [ #.platform-darwin + label: "Open Project in GitKraken" + command: 'gitkraken:release' + ] diff --git a/package.json b/package.json index 1ad83bc..0bf7077 100644 --- a/package.json +++ b/package.json @@ -8,15 +8,14 @@ "gitkraken", "workflow" ], - "homepage": "https://atom.io/packages/gitkraken", - "repository": { - "type": "git", - "url": "git+https://github.com/danielbayley/atom-gitkraken.git" + "homepage": "https://atom.io/packages/gitkraken#readme", + "repository": "danielbayley/atom-gitkraken", + "bugs": "https://github.com/danielbayley/atom-gitkraken/issues", + "author": { + "name": "Daniel Bayley", + "email": "daniel.bayley@me.com", + "url": "https://github.com/danielbayley" }, - "bugs": { - "url": "https://github.com/danielbayley/atom-gitkraken/issues" - }, - "author": "Daniel Bayley <daniel.bayley@me.com> (https://github.com/danielbayley)", "private": true, "license": "MIT", "os": [ diff --git a/styles/gitkraken.less b/styles/gitkraken.less index ca2e8fe..35c5627 100644 --- a/styles/gitkraken.less +++ b/styles/gitkraken.less @@ -1,7 +1,6 @@ @import 'ui-variables'; -[class^="status-bar"] .git-branch //[class^="git-"] -{ - cursor: pointer; - &:hover { color: @text-color-highlight } +.status-bar .git-branch { + cursor: pointer; + &:hover { color: @text-color-highlight } } -- GitLab