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
930
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
430
上手に付き合うコンポーネントテスト
quramy
4
1.6k
Patched fetch did not work
quramy
6
540
GraphQL あるいは React における自律的なデータ取得について
quramy
16
4.2k
Next.js App Router
quramy
15
3k
Fragment Composition of GraphQL
quramy
16
3k
reg-viz VRT tools
quramy
4
1.2k
NoInfer
quramy
0
210
Precondition with schema directives
quramy
0
1.4k
Other Decks in Programming
See All in Programming
最新TCAキャッチアップ
0si43
0
140
受け取る人から提供する人になるということ
little_rubyist
0
230
Jakarta EE meets AI
ivargrimstad
0
130
Realtime API 入門
riofujimon
0
150
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
ヤプリ新卒SREの オンボーディング
masaki12
0
130
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
310
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Building Your Own Lightsaber
phodgson
103
6.1k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Side Projects
sachag
452
42k
GitHub's CSS Performance
jonrohan
1030
460k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Gamification - CAS2011
davidbonilla
80
5k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
The Invisible Side of Design
smashingmag
298
50k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
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