Skip to content

Instantly share code, notes, and snippets.

@tabrindle
Last active May 25, 2017 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tabrindle/f1b9f9e80641557451c9abb930e91310 to your computer and use it in GitHub Desktop.
Save tabrindle/f1b9f9e80641557451c9abb930e91310 to your computer and use it in GitHub Desktop.
npm devDependencies vs dependencies
  • devDependencies are things like babel-cli and prettier or ava that you need to develop your app. If it is a command line tool or something that makes development possible, it should be here.

  • install using npm install <package> --dev or npm install <package> --save-dev to add to package.json in devDependencies

  • dependencies are packages that you are going to ship with the final product, and are required for your user to run your app, service or product.

  • install using npm install <package> or npm install <package> --save to add to package.json in dependencies

  • sometimes dependencies can also be devDependencies. Lodash is a common example of a package that is commonly used for development code (think unit tests, configuration scripts and similar) as well as front end.

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