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
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
280
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
280
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
720
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
160
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1k
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
340
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
720
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3k
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
360
新卒PdEのリアル
ryu1013
1
500
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
So, you think you're a good person
axbom
PRO
2
2.2k
Side Projects
sachag
456
43k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
Balancing Empowerment & Direction
lara
6
1.3k
Optimising Largest Contentful Paint
csswizardry
37
4k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
890
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Six Lessons from altMBA
skipperchong
29
4.5k
Deep Space Network (abreviated)
tonyrice
0
310
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.