Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Become a node package maintainer

Become a node package maintainer

Node's official package manager npm already has more then 17.000 entries.

These packages enable node developers to build web applications faster than ever. It's time to give something back to this great community and to contribute your own package.

Damien Klinnert will show how to become a node package maintainer with a detailed introduction and a best practices talk.

damienklinnert

November 23, 2012
Tweet

More Decks by damienklinnert

Other Decks in Programming

Transcript

  1. whois damienklinnert.com • javascript developer && computer science student &&

    working at doctape • follow me @damienklinnert Donnerstag, 22. November 12
  2. summary one: create • npm commands, package.json, folder structure, documentation,

    testing, style, build tools, git(-hub), publish two: maintain • evolution / revolution, update, semantic versioning, appreciate help Donnerstag, 22. November 12
  3. y u speak? • node and npm are awesome •

    everyone can publish packages w/o control • lots of crappy packages (crappy maintenance, crappy docs, crappy code, crappy style, crappy structure, …) Donnerstag, 22. November 12
  4. npm commands • npm init • npm install • npm

    run-script • npm docs • npm test • npm pack • npm adduser • npm publish Donnerstag, 22. November 12
  5. documentation • minimum: README.md and LICENSE • better: docs/, HISTORY.md,

    config.example • use comments, jsdoc and UML •easy to install, use and contribute Donnerstag, 22. November 12
  6. testing • use all: unit tests, functional tests, integration tests

    • add working examples in examples/ • travis-ci • utilize $ npm test Donnerstag, 22. November 12
  7. style • lint your code (use a lintconfig and ship

    it) • use only one coding style and keep a reference to it • make it simple + understandable Donnerstag, 22. November 12
  8. git(-hub) • .npmignore / .gitignore • specify repo and bugtracker

    url in package.json • keep versions the same with git tags • create HISTORY.md from git log Donnerstag, 22. November 12
  9. publish • as easy as $ npm adduser && npm

    publish • will read your package.json Donnerstag, 22. November 12
  10. evolution / revolution • check whether there already is a

    similar package and contribute instead • stick to your own design, style and guides Donnerstag, 22. November 12
  11. update • update often • fix bugs ASAP • never

    ever unpublish (be aware of dependencies) • keep repo and npm packages at the same state Donnerstag, 22. November 12
  12. semantic versioning MAJOR.MINOR.PATCH 0.1.0, 0.2.3, 2.3.15 Major: API changes Minor:

    new functionality Patch: bugfixes http://semver.org/ Donnerstag, 22. November 12
  13. appreciate help • name contributors • react immediately • enable

    discussions • merge pull requests Donnerstag, 22. November 12