Introduction to

Created/Presented by: Ashwin Hegde

All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.

Agenda

  • What is npm ?
  • Examples of npm.
  • What is package.json ?
  • Global & Local Installation/Un-installation.
  • Case studies - Underscore & HTTP-Server.

What is npm?

  • Package Manager for JavaScript.
  • 0.6.3 => bundled and installed automatically.
  • JavaScript/Coffee-Script and developed by Isaac Z. Schuleter.
  • no load, just installs them.

Examples

  • Frameworks: Express.js, Loopback, Hapi etc.
  • Task runners: Grunt, Gulp etc.
  • Generators: Yeoman etc.
  • CLI: commander etc.
  • Databases: Sequalize-ORM, mysql etc.
  • Search npm at www.npmjs.org

My reaction

When I was new to Node.js & npm

When npm fail to get install

My reaction after publishing my first npm

What is package.json?

  • Create a new module.
  • Can be published to npm.
  • Holds meta information for module.
  • "name" and "version" are 2 require fields.
  • Also "main" => default index.js
npm init

Similar environment

1. Bower - JavaScript front end .

2. PEAR, Composer - PHP

3. CPAN - Perl

4. Maven (package manager + build tool) - Java

5. RubyGems - Ruby

6. NuGet - .Net

7. Go Get - Go

8. Anaconda - Python

Case studies

  • Underscore.
  • Http-server.

Thank You

Any Questions?

Can follow me at: github.com/hegdeashwin

Introduction to npm

By Ashwin Hegde

Introduction to npm

Quick introduction to npm package manager and its basics

  • 1,258