TIL, 2017-12-23, NPM, Yarn, Babel, Webpack
webpack --h | more: Pipe to
moreto see command outputs in pages.
What are NPM, Yarn, Babel, and Webpack; and how to properly use them?
- NPM: Package manager for Node based environments. The external dependencies get stored in a file called
npm initto create that initial file.
- Yarn: A package managed that uses the NPM registry as its backend, but it creates a
yarn.lockfile to store the exact versions of dependencies to the last digit. Yarn creates and updates this lock file when things get installed, NPM needs to do
shrinkwrapfunction. Also, Yarn is faster.
- Babel: ES6 makes JS great again. Babel is a JS transpiler that converts new JS code into old ones.
- Webpack: To use SASS for styles,
PostCSSfor auto-prefixing, minification of code, we can use Webpack.
- Loaders: transform the source code of a module.
- Plugins: Does the things taht loaders can’t.
- So you add using yarn.
- You differentiate between not having the loader and not finding the file in
- The Vue thing is bad when you use the generator from