Skip to content

Instantly share code, notes, and snippets.

@foxwellm
Created November 18, 2018 18:28
Show Gist options
  • Save foxwellm/ce7e3fb56a49fe349c14e992255f921d to your computer and use it in GitHub Desktop.
Save foxwellm/ce7e3fb56a49fe349c14e992255f921d to your computer and use it in GitHub Desktop.

Why do package managers exist for front-end developers building web apps?

Building web applications across multiple platforms (IE, Firefox, Chrome, Safari etc), front-end developers can run into issues where code can run on one platform, but not others. There can be packages that are tailer fit to fixing an issue that they may run into that solves the problem which has been made by other developers who ran into the same issue. Because each package is tailer fit to solve one particular issue, package managers are used to allow you to customize all the packages you require, without having to download the massive library of all the packages out there and more importantly keep them up to date when a developer updates their individual package. The package managers are also valuable when working on group projects as your whole team will have access to the custom package set that has been created.

What is npm and what does it allow developers to do?

NPM is a package manager (Node Package Manager) that is currently one of the top used package managers. It allows developers to upload their packages to their database where other developers now have access to those packages. NPM maintains the database, updates them when changes are made, and allows users on their website to search for packages.

Describe what a 'dependency' is, and the difference between a devDependency and a regular dependency. Give an example of each.

A dependency is a package (module) that the code requires to be run. devDependency refers to the packages that are required to be run during the development phase only, so things like Babel and ESLint. Redular dependencies are packages that are required to be used during runtime (when the site is live), so things like React and Redux.

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