2022/11/26 ~ 2022/12/02 のもくもく日記
もくもく 前回までは
2022/11/19 ~ 2022/11/25 のもくもく日記 をご覧ください。
途中経過
その1
VSCode 拡張機能、こんな感じで共存できるかも
・package.json > browser → Web Extension 版 → launch.json 内のargs で"--extensionDevelopmentKind=web" にすると呼ばれる
・package.json > main → 通常版 → launch.json 内の"--extensionDevelopmentKind" を省略すれば呼ばれる
改めてドキュメント読んでみたらVSCode Extension for Web の制限事項はこの辺りっぽい👀
具体的なAPI が書いてないので、うっかり使っちゃうかもだけど、とりあえず動かないものもあると知れて良かったw
https://code.visualstudio.com/api/extension-guides/web-extensions#web-extension-main-file
その2
VSCode 拡張機能のnode とweb 版の共存、コンパイル設定が合っているのか分からんorz
Text(De|En)coder ってWeb Worker 内で使えないっぽくて、node 版ではエラーになって困った……
ちなみにnode とweb 版を分離するように、それぞれのtsconfig でコンパイルするソースの範囲を調整して、やっと出来た!
※それぞれの環境で呼べるメソッドを整備した感じっす
その3
DI ライブラリらしい 👀
その4
VSCode のビルトイン拡張機能のGit って、もしかしてclone は出来ない? https://github.com/microsoft/vscode/blob/main/extensions/git/src/api/git.d.ts
このライブラリを使うと手軽にgit 操作が出来ることが分かったw https://www.npmjs.com/package/simple-git
その5
自作VSCode 拡張機能、開発GitHub リポジトリのタグを見て、アップデートがないかどうかをチェックできるようになった🎉
これでMarketplace に公開しなくても、アップデートに気付けるはずなので、色々ツール作りが捗るはず💪
自作VSCode 拡張機能のWebView で初っ端からpostMessage してWebView 側にデータを渡すの失敗するっぽいので、色々調整中……
今回の進捗
※関連SNS
- https://x.com/shion_engineer/status/1596313737912123392
- https://x.com/shion_engineer/status/1596352566765375490
- https://x.com/shion_engineer/status/1596365056916492288
- https://x.com/shion_engineer/status/1596366303300050944
- https://x.com/shion_engineer/status/1596681937602506754
- https://x.com/shion_engineer/status/1596801595718918144
- https://x.com/shion_engineer/status/1596802134401769472
- https://x.com/shion_engineer/status/1597080109105971202
- https://x.com/shion_engineer/status/1597085637509025792
- https://x.com/shion_engineer/status/1597534430247424001
- https://x.com/shion_engineer/status/1597545555085123589
- https://x.com/shion_engineer/status/1597553746007175170
- https://x.com/shion_engineer/status/1598168336340516864
- https://x.com/shion_engineer/status/1598233786637905921
- https://x.com/shion_engineer/status/1598288294760312832
- https://x.com/shion_engineer/status/1598294669502607361