Last active
August 16, 2018 17:17
-
-
Save theoretick/0e695e24ae0b86b89cfe to your computer and use it in GitHub Desktop.
just fix it, bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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