npm and Webpack Flashcards
What is NPM?
NPM can be use used to share and and borrow packages with three components: the website, command line interface, the registry
What is a package?
Bits of reusable code/ directory with one or more files to it and contains package.json
How can you create a package.json with npm?
using npm init command with –yes or -y flag
What is a dependency and how do you add one to a package?
Dependency is any packages that directory depends on using npm install command
What happens when you add a dependency to a package with npm?
Installs a package and any packages that it depends on
What is Webpack?
bundles of javaScript modules - wraps the modules and concatenates them into a huge file
How do you add a devDependency to a package?
npm install –save-dev “name”
What is an NPM script?
shortcut commands that runs a code that we installed on devDependencies and other npm registry files
How do you execute Webpack with npm run?
npm run nameOfScript