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
The Ins-and-Outs of Publishing a Module to npm
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Steve Kinney
July 30, 2016
150
2
Share
The Ins-and-Outs of Publishing a Module to npm
Steve Kinney
July 30, 2016
More Decks by Steve Kinney
See All by Steve Kinney
React_Performance__2022.pdf
stevekinney
0
29
React Performance v2
stevekinney
0
38
Introduction to Testing
stevekinney
0
160
Web Security, Frontend Masters
stevekinney
0
3.8k
Making Music with the Web Audio API, JSConf Colombia 2023
stevekinney
0
120
React and TypeScript, Turing School
stevekinney
0
370
Redux Workshop, 2021-05-05
stevekinney
2
2.2k
TypeScript and React Utility Types
stevekinney
1
220
A Gentle Introduction to GraphQL Resolvers
stevekinney
1
170
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
130
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
520
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
420
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
570
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
None
I'm Steve. @stevekinney
I'm Steve. @stevekinney
http://turing.io
http://bit.ly/electronjs
Once upon a time…
None
None
None
“How did you get permission to publish a module on
npm?”
>250,000 registered users
~4.5 million estimated users
~84,000 have ever published a module
1.8%
None
Let's make a little module for working with rectangles.
None
None
None
Option A: Scoped modules.
@stevekinney/rectangle
Option B: Get creative.
None
None
None
None
None
None
All you have to do is make yourself a package.json.
“Steve, JSON is tedious. I'm afraid.”
Fair enough.
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Do I seriously have to type my name in every
single time?
Nope.
None
None
None
None
None
None
None
None
None
None
None
But, I really don't want to have to go get
the URL for my Git repository.
Good news! You don't have to, necessarily.
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
“I'm going to be honest with you, Steve. I just
keep hitting enter—can I just skip all of this?”
--yes
None
None
None
None
None
None
None
None
Remember: This code is going to be used by other
people. Write tests, please.
Remember: This code is going to be used by other
people. Write tests, please.
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
What if we wanted to get fancy?
None
None
None
Cool story, but the boss comes in and reminds you
that Node 0.10 is a thing.
None
None
It's totally cool to write a module in your favorite
language. But, you should publish it for the widest possible audience.
None
None
None
None
None
None
You’re never going to remember to do this.
None
None
None
npm run build
You’ll probably forget to do this too.
publish test start install
publish test start install prepublish postinstall preinstall poststart prestart posttest
prestest
None
None
None
npm run sandwich
npm run sandwich presandwich
npm run sandwich presandwich postsandwich
Problem: We want to commit our fancy ES6 code to
git, but we don't need to ship it with our module.
None
None
Don't forget to include a README.
None
None
None
None
None
None
None
None
npm version
1.0.0
1.0.1 npm version patch
1.1.0 npm version minor
2.0.0 npm version major
None
None
None
None
npm publish
None
http://turing.io http://bit.ly/electronjs