Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Node Meetup Malmö, March 2014
Search
Pelle Wessman
March 04, 2014
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Pelle Wessman
See All by Pelle Wessman
Keeping Code From Failing
voxpelli
0
67
Smarta stilmallar
voxpelli
0
300
Smarta stilmallar
voxpelli
0
1k
Other Decks in Programming
See All in Programming
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.7k
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
ジョジョの世界をXRで再現する
mofurune
0
170
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
カツオ、ご期待ください
suneo3476
0
190
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
How to Talk to Developers About Accessibility
jct
2
580
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
The untapped power of vector embeddings
frankvandijk
2
1.9k
The Curious Case for Waylosing
cassininazir
1
570
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
Skip the Path - Find Your Career Trail
mkilby
1
260
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
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.