This repository has been archived by the owner on Jun 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
135 lines (119 loc) · 4.04 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
require 'rake'
require 'fileutils'
POWERLINE_TMUX_PATH = '/usr/local/lib/python2.7/site-packages/powerline/bindings/tmux'
NODEJS_COMMON_PACKAGES = %w(
bower duo grunt-cli broccoli-cli gulp yo khaos jspm
npm-check npm-check-updates bower-check-updates avn avn-nvm browserify
madge forever nodemon jscs csslint how-to-npm
psi eslint eslint_d jsdoc stylelint doiuse
watch js-beautify nsp snyk gitbook-cli plato sloc npmd@1 live-server git-guilt doctoc
trash localtunnel svgo git+https://github.com/ramitos/jsctags.git
jsfmt fixmyjs jsinspect tmi speed-test tldr commitizen
karma-cli istanbul foreman
iron-node devtool disc stylelint-config-suitcss next-update semantic-release-cli
git-issues exact-semver fixpack cli-real-favicon greenkeeper npm-which budo
del-cli json-package npm-quick-run center-code gtni alex typings
tern recli webpack-validator all-nvm available-versions manpm center-code
conventional-changelog-cli conventional-recommended-bump
typed-css-modules chrome-webstore-upload-cli react-native-cli
create-webpack-config create-react-app node-pre-gyp npm-upgrade
yarn-completions pkgcount typescript-formatter pulp
git-recall
)
namespace :install do
desc 'install all'
task :all do
Rake::Task['install:neovim'].invoke
Rake::Task['install:powerline'].invoke
Rake::Task['install:zsh_pure'].invoke
Rake::Task['install:nvm'].invoke
Rake::Task['install:prerequisites'].invoke
Rake::Task['install:devtools_terminal'].invoke
Rake::Task['install:tpm'].invoke
end
desc 'setup prerequisites'
task :prerequisites do
puts 'setting up prerequisites...'
`stty sane`
`defaults write org.R-project.R force.LANG en_US.UTF-8`
puts 'done'
end
desc 'install common nodejs global packages'
task :nodejs_packages do
puts 'installing common nodejs global packages...'
`npm i --verbose -g #{NODEJS_COMMON_PACKAGES.join(' ')}`
puts 'configuring packages...'
`avn setup`
puts 'done'
end
desc 'install neovim'
task :neovim do
puts 'installing neovim...'
`brew install --HEAD neovim`
`pip install neovim`
puts 'done'
end
desc 'install devtools terminal'
task :devtools_terminal do
puts 'installing devtools terminal nodejs proxy...'
puts 'for more info see: https://chrome.google.com/webstore/detail/devtools-terminal/leakmhneaibbdapdoienlkifomjceknl/'
`npm install -g devtools-terminal`
`sudo devtools-terminal --install --id=leakmhneaibbdapdoienlkifomjceknl`
puts 'done'
end
desc 'install pure zsh prompt'
task :zsh_pure do
puts 'installing pure-prompt...'
`npm install -g pure-prompt`
puts 'done'
end
desc 'install powerline'
task :powerline do
puts 'installing powerline...'
`pip install --user git+git://github.com/Lokaltog/powerline`
puts 'done'
Rake::Task['install:powerline_config'].invoke
end
desc 'link powerline configuration files'
task :powerline_config do
puts 'copying powerline config files...'
`cp -R powerline/config/* ~/.config/powerline/`
`cp -R powerline/tmux/*.conf #{POWERLINE_TMUX_PATH}`
puts 'done'
end
desc 'install node version manager'
task :nvm do
puts 'installing nvm...'
`curl https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash`
puts 'done'
end
desc 'install tmux plugins'
task :tpm do
puts 'installing tmux plugins...'
`~/.tmux/plugins/tpm/scripts/install_plugins.sh`
puts 'done'
end
end
namespace :uninstall do
desc 'uninstall all'
task :all do
Rake::Task['uninstall:powerline'].invoke
Rake::Task['uninstall:zsh_pure'].invoke
Rake::Task['uninstall:nodejs_packages'].invoke
end
desc 'install common nodejs global packages'
task :nodejs_packages do
puts 'installing common nodejs global packages...'
`npm uninstall -g #{NODEJS_COMMON_PACKAGES}`
puts 'done'
end
desc 'uninstall pure zsh prompt'
task :zsh_pure do
`npm uninstall -g pure-prompt`
end
desc 'uninstall powerline'
task :powerline do
`rm -rf ~/.config/powerline`
`pip uninstall powerline-status`
end
end