If you are working on a Node.js or using Grunt/Gulp/Bower you might hear the term code dependency or list of dependencies. What this means is your project depends on another code library or framework to function properly. So your project lists these dependencies inside your package.json file and if you use Bower in a bower.json file.

In the example below below I am using some Grunt packages in my project. When I install them I have the option of saving them as dev dependencies which essentially adds the name of the package to the package.json file. That way if anyone downloads my project from GitHub and does an npm install command it will download everything I used when I was developing the project.

Sort of like a list of ingredients for a recipe.

Example package.json file from my Bootstrap 3 Sass Starter – Sparky

{
  "name": "sparky-bootstrap-3-sass-starter-template",
  "version": "1.0.0",
  "dependencies": {
    "grunt-cssnano": "^2.1.0",
    "pixrem": "^3.0.2"
  },
  "devDependencies": {
    "autoprefixer": "^6.4.1",
    "grunt": "~0.4.1",
    "grunt-contrib-concat": "^1.0.1",
    "grunt-contrib-uglify": "^1.0.1",
    "grunt-contrib-watch": "^1.0.0",
    "grunt-cssnano": "^2.1.0",
    "grunt-postcss": "^0.8.0",
    "grunt-sass": "^1.2.0",
    "postcss-cli": "^2.5.2",
    "postcss-flexbugs-fixes": "^2.0.0"
  }
}

 

Additional information on what a dependency is.

Want to save time using Bootstrap?

Bootstrap 4 Book
& Starter Templates

Learn by building a CMS admin dashboard and marketing homepage step by step.

Learn More

Term: Dependency


Written By: / Read Full Bio
Last updated on

Have a question?