O'Reilly logo

jQuery Essentials by Troy Miles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing plugins

You have found a plugin or two that you like, so now what? Installing a plugin via npm is also easy but first you need to make sure that you have a package.json file located in the root of your application. This is a JSON file that is required by npm. If you don't have a package.json file, npm will not install your plugin. The following is an example of a rather minimalistic package.json file:

{
  "name": "plugins",
  "version": "1.0.0",
  "description": "A demo of using and writing plugins",
  "repository": "none",
  "license": "MIT",
  "dependencies": {
    "tipso": "^1.0.6"
  }
}

Please note that it is a JSON file and not a JavaScript object. The first field is the name of the application. Name is a required field; without it, npm will not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required