devdot
Set of dotfiles for node developers
Last updated 4 years ago by yhjor .
UNLICENSED · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install devdot 
SYNC missed versions from official npm registry.

Automate your life

It is painful to manually install all neccessary development settings. Development is consist of many accumulate actions to make things done. Productivity is the key to help you focus more.

Be smart! Let's integrate it into your workflow!

What is dotfiles

In short, it is something about configuration. For example, you can assign scripts into your .bash_profile to show your current git status and branching information inside your bash terminal. You will save a lot of time if you can have those information without any effort. Of course, there are more.

Target Groups

  • OSX User
  • Development using Node.js
  • Development with Atom

Mounting

OSX settings (configs/osx.sh)

You can toggle your preferred settings:

# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "

# Disable smart dashes as they’re annoying when typing code
# defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false

Git Config

It is very common nowadays to use git. We simplify the git config in the following as example:

[branch]
	autosetuprebase = always
	autosetupmerge = always

[apply]
  	# Detect whitespace errors when applying a patch
  	whitespace = fix

[alias]
	logs = log --oneline --decorate
	merged = branch --merged
  	not-merged = branch --no-merged
  	contributors = shortlog --summary --numbered
	rb = !sh -c \"git rebase -i HEAD~$1\"
	clean-fixed = !sh -c \"git branch --merged | grep fix/ | grep -v \\* | xargs -n 1 git branch -d\"
	push-gerrit = !sh -c \"git push origin @:refs/for/$1\"
	
[push]
	default = current

Terminal Config

  • config/prompts.sh
  • config/colors.sh

The above files gave the look and feel for development using Git:

 <path>/<current dir> (branch name):

The line will look like this if there are any new changes:

 <path>/<current dir> (branch name *):

Alias

There are two main files of alias:

  • alias/general.sh
  • alias/dev.sh

Here are some examples:

alias ip="dig +short myip.opendns.com @resolver1.opendns.com" 

# Show/hide hidden files in Finder
alias show-hidden="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
alias hide-hidden="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"

alias .....='cd ../../../..'
alias desktop='cd ~/Desktop && open .'

# application related
alias gu='gulp'
alias x='gitx'
alias g=git

# node related
alias ni='node-inspector --preload=false &'
alias nd='node --debug'
alias cleanup='rm -rf node_modules'

Installation

To kickstart the development time on new machine, you just need to mount the dotfiles and run a simple command like this:

df-install

Entry point: install.sh

Installation is base on the following orders:

  1. OS Update

  2. Homebrew

  3. Development tools

  4. Atom

     # give root permission to install system packages
     sudo -v
     
     # Update OS
     sudo softwareupdate -iva
    

Installation: Homebrew and Apps (with just Brewfile)

It will install homebrew with brew cask.

You can just append the following to Brewfile, that's it.

brew 'nvm'
cask 'google-chrome'

Installation: Atom and Packages

Atom installs packages via its own cli called apm.

You can add desired packages easily:

# jumper
apm install project-switcher # (cmd + ;)
apm install line-jumper # (alt + up/down)

# show color
apm install pigments

# linting
apm install linter
apm install linter-eslint

# snippets
apm install es6-javascript
apm install react

# git related
apm install git-blame # (ctrl + b)
apm install git-history # (ctrl + alt + h)
apm install merge-conflicts # (alt + m + d)
apm install show-origin # (ctrl + alt + o)
apm install line-diff-details
apm install branch-status

Installation: Development settings (for node currently)

It will install the following libs to kickstart development process:

xcode-select --install

if [ -z "$NPM_VERSION" ]; then
  nvm install $NPM_VERSION
fi

npm install -g gulp
npm install -g babel-cli

heroku update

# to launch start mongodb at login
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

# load mongodb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

Enjoy!

Current Tags

  • 0.0.7                                ...           latest (4 years ago)

2 Versions

  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 2
Dependencies (10)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |