Created
May 4, 2017 19:59
-
-
Save dcamilleri/bb88eeecde4453a501d4990369855474 to your computer and use it in GitHub Desktop.
npm vs npm5
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 clearCaches { | |
# Clear npm cache | |
npm cache clean | |
# Clear npm5 cache | |
npm5 cache clear --force | |
} | |
# Clear all caches | |
clearCaches | |
# Create dumb directory and init a package.json | |
mkdir npm-vs-npm5 && cd npm-vs-npm5 && npm init -y | |
# Run npm test. | |
time npm install react react-dom lodash express webpack babel-core babel-cli immutable --save | |
# Clear all caches | |
clearCaches | |
# Remove node_modules | |
rm -rf node_modules | |
# Run npm5 test. | |
# Note: you must have npm5 installed. If not, run : | |
# npm i -g npm5 | |
time npm5 install react react-dom lodash express webpack babel-core babel-cli immutable | |
# Enjoy the results ⚡️🔥 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great