This guide is to remind me of what to do after a full format. I will probably automate this in the end, but for now this will track whats required.
- Install Homebrew
- Install git -
brew install git
- Install git -
-
Install Node using the installer from the node homepage
-
Change the location of global packages to avoid using
sudo
and 3rd party permissions errors. The following snippets are parapharsed from this article and as such are not my work.-
npm config list
- (This gives us information about our install. For now it’s important to get the current global location.)$ npm config list ; cli configs user-agent = "npm/3.6.0 node/v5.7.0 linux x64" ; node bin location = /usr/local/bin/node ; cwd = /home/sitepoint ; HOME = /home/sitepoint ; 'npm config ls -l' to show all defaults.
-
npm config get prefix
(This is the prefix we want to change, so as to install global packages in our home directory)$ npm config get prefix /usr/local
-
cd && mkdir .node_modules_global
-
npm config set prefix=$HOME/.node_modules_global
-
npm config get prefix
(Check it worked like this)$ npm config get prefix /home/sitepoint/.node_modules_global
-
cat .npmrc
(This has also created a .npmrc file in our home directory.)$ cat .npmrc prefix=/home/sitepoint/.node_modules_global
-
-
As the last set of steps changed the location to which global Node packages are installed. We should now take advantage of this and do the same for NPM. To do this we need to install npm again, but this time in the new user-owned location. This will also install the latest version of npm.
npm install npm --global
$ npm install npm --global /home/sitepoint/.node_modules_global/bin/npm -> /home/sitepoint/.node_modules_global/lib/node_modules/npm/bin/npm-cli.js /home/sitepoint/.node_modules_global/lib └── npm@3.7.5`
- Finally, we need to add
.node_modules_global/bin
to our$PATH
environment variable, so that we can run global packages from the command line. Do this by appending the following line to your .profile, .bash_profile or .zshrc and restarting your terminal.export PATH="$HOME/.node_modules_global/bin:$PATH"
source ~/.zshrc
ORsource ~/.bash_profile
- Now our .node_modules_global/bin will be found first and the correct version of npm will be used.
$ which npm /home/sitepoint/.node_modules_global/bin/npm $ npm --version 3.7.5
- Install Sublime Text 3
- Install Package Manager
- Install Sublime Text plugins
- Side Bar Enhancements
- Git
- GitGutter
- Emmet
- All auto complete
- Color picker
- Markdown Preview
- Doc Blocker
- Pug
- Stylus
- JSX
- ESlint
- Babel
- Sublime Linter
- SublimeLinter- JSON
- SublimeLinter- JSCS
- SublimeLinter - JS Hint (if using eslint dont need this, its an either or)
- SublimeLinter-JSX Hint
- Install Sublime Text Theme
- Oceanic Next Color Scheme (Works well with React)
- Install Alfred
- Install Caffine
- Install Cold Turkey
- Install Tomighty
- Install Spectacle