Upgrade to Pro — share decks privately, control downloads, hide ads and more …

gulpをやめてnpm scriptを使う

gulpをやめてnpm scriptを使う

社内勉強会で使った資料です

7e56a691cfb413e0f6e631791f33fe54?s=128

misumi

July 06, 2021
Tweet

Transcript

  1. HVMQΛ΍Ίͯ OQNTDSJQUΛ࢖͏

  2. ࠓ೔ͷ࿩ ɾλεΫϥϯφʔͰHVMQΛ࢖Θͳ͍Α͏ʹͯ͠ΈΔ ɾ୅ΘΓʹOQNTDSJQUΛ࢖͏ ɾOQNTDSJQUΛ࢖͏ϝϦοτσϝϦοτͳͲ

  3. HVMQͱ͸ ɾϫʔΫϑϩʔΛࣗಈԽͯ͘͠ΕΔπʔϧ ɾ4BTTΛ$44΁ίϯύΠϧͨ͠Γ ɾλεΫͰ༷ʑͳϓϥάΠϯΛ૊Έ߹ΘͤΔ͜ͱͰ ɹॊೈʹλεΫΛ࡞੒Ͱ͖Δ

  4. OQNTDSJQUͱ͸ ɾQBDLBHFKTPOͷTDSJQUTʹهड़͢ΔͱTIFMMTDSJQU΍ ɹίϚϯυΛ࣮ߦͰ͖Δ ɾOPEF@NPEVMFTʹ௥Ճͨ͠ϥΠϒϥϦΛͦͷ·· ɹར༻͢ΔʢHVMQͷϓϥάΠϯΛհ͞ͳ͍ʣ ɾ࠷ۙOQNTDSJQUͰHVMQͷஔ͖׵͑هࣄΛΑ͘ݟΔ͕ɺ ɹผʹ໨৽͍͠΋ͷͰ΋ͳ͍

  5. OQNTDSJQUͱ͸ "scripts": { "css:sass": "sass src/sass/style.scss:dist/css/style.css --style=expanded --no-source-map", }, ྫ

  6. ϝϦοτ ɾOPEF@NPEVMFTͷύοέʔδΛͦͷ··࢖͏ͷͰ ɹHVMQͷϓϥάΠϯͷ࢓༷ʹࠨӈ͞Εͳ͍ ɹྫʣHVMQTBTTͷ!JNQPSUഇࢭ໰୊ʢํ๏͸͋Δ͚Ͳ ɾλεΫϥϯφʔͷҠΓมΘΓʹࠨӈ͞Εͳ͍ ɹʢੲͷHSVOU͔ΒHVMQͳͲ

  7. σϝϦοτ ɾQBDLBHFKTPOʹશͯͷλεΫΛॻ͘ͷͰهड़ྔ͕ ɹ૿͑ΔɻՄಡੑʢͱ͸͍͑Ұ౓࡞ͬͨΒऴΘΓʣ ɾHVMQͷϓϥάΠϯͰָͰ͖͍ͯͨԸܙ͕ͳ͘ͳΔ ɾTIFMMTDSJQUΛ࢖͏৔߹ΫϩεϓϥοτϑΥʔϜͰͳ͍ ɹʢ.BDͱ8JOEPXTͰίϚϯυ͕ҧ͏ʣ

  8. ؀ڥߏஙσϞ ɾ)5.-͸ͦͷ··ίϐʔ ɾ4BTTΛ$44΁ίϯύΠϧɺ1PTU$44Λ૊Έ߹Θͤͯ ɹ"VUPQSF fi YFSΛ࢖͏ ɾ#BCFMͰ+4ΛτϥϯεύΠϧ ɾCSPXTFSTZODͰϒϥ΢β্ཱͪ͛Δ ɾ֤ϑΝΠϧͷߋ৽Λ؂ࢹ

  9. σϞ

  10. OQNTDSJQU ɾHVMQΛ࢖Θͳͯ͘΋؆୯ʹ؀ڥΛ࡞Εͨ ɾը૾ͱ͔΋ಉ༷ʹઃఆ͢Ε͹0, ɾෳࡶͳॲཧ͕ͳ͍ͳΒOQNTDSJQUͰे෼

  11. ऴΘΓ