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
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Amazon Qを使ってIaCを触ろう!
maruto
0
400
C++でシェーダを書く
fadis
6
4.1k
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
RubyLSPのマルチバイト文字対応
notfounds
0
120
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Featured
See All Featured
A designer walks into a library…
pauljervisheath
203
24k
Visualization
eitanlees
145
15k
Practical Orchestrator
shlominoach
186
10k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Producing Creativity
orderedlist
PRO
341
39k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Building an army of robots
kneath
302
43k
Rails Girls Zürich Keynote
gr2m
94
13k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
What's new in Ruby 2.0
geeforr
343
31k
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ɻ