Skip to content

Instantly share code, notes, and snippets.

@dcamilleri
Created May 4, 2017 19:59
Show Gist options
  • Save dcamilleri/bb88eeecde4453a501d4990369855474 to your computer and use it in GitHub Desktop.
Save dcamilleri/bb88eeecde4453a501d4990369855474 to your computer and use it in GitHub Desktop.
npm vs npm5
#!/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 ⚡️🔥
@mrm8488
Copy link

mrm8488 commented May 5, 2017

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment