Skip to content

Instantly share code, notes, and snippets.

@theoretick
Last active August 16, 2018 17:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theoretick/0e695e24ae0b86b89cfe to your computer and use it in GitHub Desktop.
Save theoretick/0e695e24ae0b86b89cfe to your computer and use it in GitHub Desktop.
just fix it, bash
#!/bin bash
function dammit_bundler() {
bundle clean
bundle install
}
function dammit_npm() {
rm -fr ./node_modules/
npm cache clean -f
sudo npm install -g n
sudo n stable
npm install
}
function dammit_mix() {
mix deps.clean --all
mix deps.get
## Optionally fix phoenix asset issues
# rm -rf ./node_modules
# npm install
# node node_modules/brunch/bin/brunch build
# mix phoenix.digest
}
function just_fix_it() {
#if which bundle > /dev/null; then
if [ -f "Gemfile" ]; then dammit_bundler fi
if [ -f "package.json" ]; then dammit_npm fi
if [ -f "mix.exs" ]; then dammit_mix fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment