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
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
AI & Enginnering
codelynx
0
110
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
970
SourceGeneratorのススメ
htkym
0
200
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
AI巻き込み型コードレビューのススメ
nealle
1
290
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
Accessibility Awareness
sabderemane
0
51
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Docker and Python
trallard
47
3.7k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
320
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
HDC tutorial
michielstock
1
380
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
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.