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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
今から始めるClaude Code超入門
448jp
8
8.7k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
120
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
並行開発のためのコードレビュー
miyukiw
0
130
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
230
SourceGeneratorのススメ
htkym
0
200
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
New Earth Scene 8
popppiees
1
1.5k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
220
WENDY [Excerpt]
tessaabrams
9
36k
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.