Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Node Meetup Malmö, March 2014
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Pelle Wessman
March 04, 2014
Programming
0
100
Node Meetup Malmö, March 2014
Quick presentation on some good things to know about if one want to publish a package on npm
Pelle Wessman
March 04, 2014
Tweet
Share
More Decks by Pelle Wessman
See All by Pelle Wessman
Keeping Code From Failing
voxpelli
0
57
Smarta stilmallar
voxpelli
0
270
Smarta stilmallar
voxpelli
0
960
Other Decks in Programming
See All in Programming
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
220
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
140
MUSUBIXとは
nahisaho
0
120
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
120
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Basic Architectures
denyspoltorak
0
660
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
110
CSC307 Lecture 02
javiergs
PRO
1
770
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
190
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
860
Featured
See All Featured
A Soul's Torment
seathinner
5
2.2k
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Site-Speed That Sticks
csswizardry
13
1.1k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Mind Mapping
helmedeiros
PRO
0
74
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.8k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
88
BBQ
matthewcrist
89
10k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Transcript
npm publishing by Pelle Wessman, @voxpelli
package.json the core of it all
CommonJS Based on the Packages/1.0 spec
npm is basically the registry and the registry client (developed
by Isaac Z. Schlueter – npm, Inc.)
Required fields • name – should be URL-safe! (and no
”js”, ”node”) • version – semantic please! http://semver.org/ 1.0.0 === Major.Minor.Patch version
Important field ”private”: ”true” if you don’t want to publish!
Info fields • description • repository • homepage • bugs
• author • (README.md – and please – a changelog somewhere!) • (http://npmjs.org/~ – your social media and geek media (IRC) links!)
Code fields • main – the one field that node.js
itself uses • directories – directories.lib / directories.example
Env fields • engines – should define ”node • engineStrict
Global module fields • preferGlobal – results in warning on
local install • bin / directories.bin • man / directories.man
Script fields • scripts – test / start / lots-of-fun-stuffs
• config – for the above scripts
dependencies
devDependencies
• bundledDependencies • optionalDependencies • peerDependencies
.npmignore Defaults to .gitignore + eg. .DS_Store, .git, npm-debug.log Good
for excluding tests, examples etc. from packages
Compiled modules… …stuff for them to – but lets save
that for another time
Commands for the publisher
npm publish npm publish or npm publish https://github.com/voxpelli/foo/archive/v0.2.5.tar.gz
npm publish —tag <foo> for prereleases, betas, alphas, dev-releases etc
npm install foo@dev
• npm deprecate – package or version range • npm
version <major,minor,patch,1.33.7>
npm link to use your module locally during development (…but
exclude the global npm folder from OS X Time Machine)
Other use cases Not just Node.js uses NPM, but also
Browserify, Ender.js etc.