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
Change your source with AST
Search
Yosuke Kurami
June 26, 2018
Programming
3
940
Change your source with AST
For Roppongi.js#4
Yosuke Kurami
June 26, 2018
Tweet
Share
More Decks by Yosuke Kurami
See All by Yosuke Kurami
App Router 悲喜交々
quramy
7
520
上手に付き合うコンポーネントテスト
quramy
4
1.9k
Patched fetch did not work
quramy
6
590
GraphQL あるいは React における自律的なデータ取得について
quramy
18
4.8k
Next.js App Router
quramy
15
3.3k
Fragment Composition of GraphQL
quramy
16
3.5k
reg-viz VRT tools
quramy
4
1.3k
NoInfer
quramy
0
240
Precondition with schema directives
quramy
0
1.5k
Other Decks in Programming
See All in Programming
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
250
CNCF Project の作者が考えている OSS の運営
utam0k
3
460
快速入門可觀測性
blueswen
0
500
2025.01.17_Sansan × DMM.swift
riofujimon
2
600
良いユニットテストを書こう
mototakatsu
13
3.6k
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
15
2.6k
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
3k
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
0
110
Rubyでつくるパケットキャプチャツール
ydah
0
220
Beyond ORM
77web
11
1.6k
Scaling your build logic
antalmonori
1
120
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
89
5.8k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
Documentation Writing (for coders)
carmenintech
67
4.6k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
How STYLIGHT went responsive
nonsquared
96
5.3k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Bash Introduction
62gerente
610
210k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Transcript
"45Λͬͨ ιʔείʔυฤूͷ 3PQQPOHJKT CZ!2VSBNZ
গ͠લʹCFUUFSOBNFͱ͍ ͏$-*πʔϧΛͭ͘Γ·ͨ͠ https://github.com/Quramy/better-name
ͳͥ࡞ͬͨͷ͔
ͳͥ࡞ͬͨͷ͔ w ಛʹࣄͰ Ұॻ͍ͨKTϑΝΠϧͷॴΛɺޙ͔Βม͑ ͨ͘ͳΔ͜ͱ͕݁ߏ͋Δ w FYQPSU͢ΔGVODUJPODMBTT໊ࡶʹਖ਼نදݱͰ͍͍͚Ͳɺ JNQPSUͷ૬ରύεΛ͢ͷׂͱμϧ͍ w *%&ʹΑΒͣɺڞ௨ͷಈ࡞͕อূ͞Εͯ΄͍͠
WJNNFSͳͷͰɺྡͷಉ྅͕εΠεΠ8FC4UPSNͱ͔ͬ ͯΔͷݟΔͱෲཱͭ
Ͱ͖ͨͷ w NWίϚϯυͱେମҰॹɻGSPN'JMFͷύε͕UP'JMFҠΔ ͚ͩ better-name [options] <fromFile> <toFile> w JNQPSUจͷ߹ੑΛҠಈલޙͰ୲อͯ͘͠ΕΔ
͜Μͳ͔Μ͡
JNQPSUͱ"45 w -5λΠτϧʹ͋Δ௨Γɺ͜ͷπʔϧ+BWB4DSJQUͷ "45 நߏจ Λղੳ͍ͯ͠Δ w JNQPSUFYQPSUจ๏ͷ੍͕ݫ͍͠ ཪΛฦ͢ͱΊͬͪΌղੳ͍͢͠
͙͢࡞Εͦ͏ w ࣮ϓϥϯ KTKTYͷέʔε w CBCZMPOͰιʔείʔυΛ"45QBSTF w !CBCFMUSBWFSTFͰ"45 ͷJNQPSUจ
Λม w !CBCFMHFOFSBUFͰ"45͔ΒιʔείʔυΛੜ
ͪͳ54ͷ߹ w ࣮ϓϥϯ UTUTYͷέʔε w UTDSFBUF4PVSDF'JMFͰιʔείʔυΛ"45QBSTF w UTUSBOTGPSN $VTUPN5SBOTGPSNFSͰ"45
ͷ JNQPSUจ Λม w UTDSFBUF1SJOUFSͰ"45͔ΒιʔείʔυΛੜ
Ұ௨Γ࣮ͯ͠ؾͮ͘
͋ΕɺJNQPSUจ͔͠มͯ͠ͳ͍ͷʹɺ ࣮ߦલޙͰEJ⒎ग़ա͗͡ΌͶʜ
͓·ΘΓ͞ΜίΠπͰ͢ w ࣮ϓϥϯ KTKTYͷέʔε w CBCZMPOͰιʔείʔυΛ"45QBSTF w !CBCFMUSBWFSTFͰ"45 ͷJNQPSUจ
Λม w !CBCFMHFOFSBUFͰ"45͔ΒιʔείʔυΛੜ
ͬͪ·ͬͨ w ͦͦ "45ιʔείʔυՄٯม͡Όͳ͍ FHηϛίϩϯ Πϯσϯτ ετϦϯάϦςϥϧ FUD w
QSFUUJFS͔͚Ε͍͍ɺͱࢥ͍ͬͯͨ w ۭߦ͕আ͞Εͯ͠·͏݅Ͳ͏͠Α͏ͳ͍
Γ͠
"45ͷमਖ਼Λιʔεө͞ ͤΔʹ w !CBCFMHFOFSBUFΘͳ͍ ͏ʹͯ͠ہॴతʹ w "45Λղੳͨ͠ޙɺมߋ͍ͨ͠༰ͱରOPEFͷMPDBUJPO ͔Β5FYU$IBOHFΛ࡞Γɺιʔείʔυͷจࣈྻʹద༻͞ ͤΔͷ͕ਖ਼ղ
ʮ"45͔ΒੜʯͰͳ͘ʮ"45ͷมߋΛద༻ʯʹ͢Δ
5FYU$IBOHF w ԫ৭ͷ෦Ұมߋ͕ͳ͍ ιʔείʔυͦͷ·· w มߋ͕ෳͷ߹ɺιʔείʔυͷޙΖ͔Βద༻͢Δ import { someFn
} from "./target"; export default function main() { someFn(); } import { someFn } from “./new-target”; export default function main() { someFn(); } textChanges = [{ start: 24, end: 32, text: 'new-target' }]
·ͱΊ w !CBCFMHFOFSBUPSUT1SJOUFSΛιʔείʔυमਖ਼ͷ తͰΘͳ͍ɻཚ༻͠ͳ͍ w 5FYU$IBOHFͷύλʔϯΛ͓֮͑ͯ͘ͱɺͲ͔͜Ͱʹཱ ͔ͭʜ
5IBOLZPV