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.js Package Management
Search
Shuhei Kagawa
February 19, 2015
Programming
0
100
Node.js Package Management
Node.js には詳しくないけど Grunt などでしょうがなく使っている人向けの npm の話。
Shuhei Kagawa
February 19, 2015
Tweet
Share
More Decks by Shuhei Kagawa
See All by Shuhei Kagawa
Profiling Node.js apps on production
shuhei
0
820
Building a Pixel Art Editor with Elm
shuhei
1
740
Redux Middleware Wars (Japanese)
shuhei
8
1.8k
Redux Middleware Wars (English)
shuhei
0
150
Draw Animated Chart on React Native
shuhei
0
8.7k
Angular 2 Offline Compiler
shuhei
0
5.4k
Weird Attractors
shuhei
0
820
Angular 2 @ JS Ojisan #6-3
shuhei
1
3k
Introduction to Angular 2
shuhei
2
140
Other Decks in Programming
See All in Programming
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
960
Ethereum_.pdf
nekomatu
0
460
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
CSC509 Lecture 12
javiergs
PRO
0
160
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Jakarta EE meets AI
ivargrimstad
0
600
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
Quine, Polyglot, 良いコード
qnighy
4
650
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Jakarta EE meets AI
ivargrimstad
0
220
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Featured
See All Featured
Building Adaptive Systems
keathley
38
2.3k
Facilitating Awesome Meetings
lara
50
6.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Building Applications with DynamoDB
mza
90
6.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The World Runs on Bad Software
bkeepers
PRO
65
11k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Producing Creativity
orderedlist
PRO
341
39k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
How GitHub (no longer) Works
holman
310
140k
Transcript
Node.js ͷύοέʔδ ཧ 2015/2/19 @ M3 Tech Talk Shuhei Kagawa
• ϑϩϯτΤϯυͷϏϧυʹ Grunt Λ͍ͬͯΔɻ • ϩʔΧϧͰޭ͍ͯ͠ΔͷʹɺJenkins ͰϏϧυ ͕ࣦഊ͢Δɾɾɾɻ
npm • npmjs.com • 12 ສ ύοέʔδɺ1754 ສμϯϩʔυ/ • ϓϩδΣΫτͷ
package.json ͱ͍͏ϑΝΠϧʹґଘ ϞδϡʔϧΛهड़ɻ • npm install ͢ΔͱϓϩδΣΫτσΟϨΫτϦҎԼͷ node_modules ͱ͍͏σΟϨΫτϦʹΠϯετʔϧ͞ ΕΔɻ
UNIX ֶ Write programs that do one thing and do
it well ؔҰݸ͚ͩͷϞδϡʔϧ݁ߏ͋Δɻ
ࣗͷϓϩδΣΫτ ௨ৗɺͬͱ͘ਂ͘ ωετ͍ͯ͠Δ
ґଘϞδϡʔϧͷࢦఆ • package.json ʹόʔδϣϯͱͱʹهड़ɻ • ϑΝδʔͳόʔδϣϯࢦఆ͕σϑΥϧτʢnpm install —saveʣɻ • ~1.2.3
= 1.2.3 Ҏ্ 1.3.0 ະຬ ^1.2.3 = 1.2.3 Ҏ্ 2.0.0 ະຬ ^0.2.3 = 0.2.3 Ҏ্ 0.3.0 ະຬ • semver ͕ ݫີʹकΒΕ͍ͯΕ breaking change ͳ͍ ͣɾɾɾ • ͪΖΜී௨ʹࢦఆ͢Δ͜ͱ͕Ͱ͖Δɻ
ґଘύοέʔδͷ όʔδϣϯݻఆ • ϓϩδΣΫτ͕ґଘ͢ΔϥΠϒϥϦͷόʔδϣ ϯݻఆͰ͖Δɻ • ͕ɺϥΠϒϥϦ͕ґଘ͍ͯ͠ΔϥΠϒϥϦʢଙҎԼʣ ͷόʔδϣϯࢦఆͰ͖ͳ͍ʂʂʂ
npm shrinkwrap • node_modules ͷύοέʔδͷόʔδϣϯΛ npm-shrinkwrap.json ʹอଘɻ • ͜ΕΛόʔδϣϯཧ͢ΕɺͲ͜Ͱ·Ͱಉ ͡όʔδϣϯͷύοέʔδΛΠϯετʔϧͰ͖Δɻ
• ͙͢Կઍߦͱ͔ʹͳΔ͚Ͳɾɾɾɻ
·ͱΊ • খ͍͞Ϟδϡʔϧ͕ͨ͘͞Μωετ͍ͯ͠Δɻ • ௨ৗɺଙҎԼͷϞδϡʔϧόʔδϣϯݻఆͰ͖ͳ ͍ɻ • Ͳ͏ͯ͠ݻఆ͚ͨ͠Ε npm shrinkwrapɻ