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
Babylon.jsユーザのためのCLIを軽率にnpmで公開した話 / about creat...
Search
にー兄さん
July 05, 2023
Programming
0
860
Babylon.jsユーザのためのCLIを軽率にnpmで公開した話 / about create babylon app CLI
Babylon.jsゆるほめLT会 vol2で登壇した資料です
にー兄さん
July 05, 2023
Tweet
Share
More Decks by にー兄さん
See All by にー兄さん
軽率にプログラミング言語のシンタックスについて考えてみよう / lets-think-about-programming-lang-syntax
drumath2237
0
46
エンジニアが軽率に趣味から始める、OSS貢献を軸とした個人活動 / oss-contribution-as-a-hoby-project
drumath2237
0
32
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
140
フォークギター with VFXの 制作を軽率に振り返ろう! / look back fork guitar with vfx
drumath2237
0
31
軽率に始まった Babylon.js勉強会運営の 1年間をふりかえって / look back babylonjs japan activity
drumath2237
0
54
利己的利他、 あるいは軽率2.0に備えよ。 / prepare-for-keisotsu-2.0
drumath2237
0
44
軽率にAndroidXRのJetpack SceneCoreを使って3Dモデルを表示してみる / androidxr-scenecore-3dmodels
drumath2237
0
110
あなたの知らないWebXR Device APIの話を軽率に / about-webxr-device-api-you-dont-know
drumath2237
0
34
UnJSを使って軽率にCLIを作ってみたらめちゃくちゃ便利だった / create CLI with UnJS
drumath2237
4
1.6k
Other Decks in Programming
See All in Programming
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
790
What's new in AppKit on macOS 26
1024jp
0
140
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
4
240
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
900
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
2
14k
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
750
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
310
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
15
5.3k
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
160
技術同人誌をMCP Serverにしてみた
74th
1
680
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
240
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
810
Featured
See All Featured
A Tale of Four Properties
chriscoyier
160
23k
Git: the NoSQL Database
bkeepers
PRO
430
65k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Side Projects
sachag
455
42k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Facilitating Awesome Meetings
lara
54
6.5k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Why Our Code Smells
bkeepers
PRO
336
57k
How to Ace a Technical Interview
jacobian
278
23k
It's Worth the Effort
3n
185
28k
Visualization
eitanlees
146
16k
Transcript
Babylon.jsユーザのためのCLIを 軽率にnpmで公開した話 にー兄さん@ninisan_drumath Babylon.js ゆるほめLT会 vol.2
アジェンダ - create-babylon-appを作りました - 要件と実装 - おわりに
にー兄さん(@ninisan_drumath) ソフトウェアエンジニア 株式会社ホロラボ / IwakenLab Unity / ロケーションベースAR / WebAR
/ Babylon.js / Azure Kinect 最新技術を使った検証開発や デモンストレーションが好き 唐突な うちの猫たち→
create-babylon-appを作りました
crate-babylon-appは Babylon.js環境構築の手間を減らすために開発したCLIです。 Babylon.jsユーザのためのCLI
とりあえずデモ
要件と実装
環境構築はわりと手間 Babylon.js(TypeScript)の環境構築はちょっと時間かかる @babylonjs/core入れて、canvas配置して、css書いて、ts書いて...... でもやってること毎回同じなんだよな……。 create-vite的なツールみたいなのが欲しい
要件 - npmありきで使えるCLI - エディタを開かずにdevサーバ起動までやる - テンプレートから選べる - インターフェースも作る -
Playgroundのコードがコピペで動く
採用ツール - pnpm - 気になっていたので採用。良き - TypeScript - 型が無いと始まらないため -
@inquirer/prompts - CLIフレームワーク。直観的で良い - コンパイルで若干苦戦した - fs-extra - node:fsでできない、痒い所に手が届く良ライブラリ
create xxx系のCLI npmで「create-xxx」という名前で公開する npm create xxxというコマンドで create-xxxというパッケージを検索してくれる 簡単! create initもエイリアスになってる
ディレクトリ構造 / ├─ src/ │ └─ index.ts ├─ dist/ │
└─ index.js ├─ index.cjs └─ package.json src/index.tsをビルドして dist/index.jsを生成 index.cjsからdist/index.jsの中身を実行 package.jsonでindex.cjsをbinとして登録
CI/CD 申し訳程度にCI/CD 自動バージョニングや リリースノート作成 も追加したいな…...
おわりに
まとめ など - create-babylon-appで簡単に環境構築が可能に - 本当は公式で作ってほしいなぁ - Node.jsのCLIを作るのは初めてだったけど楽しかった - Webpack、Turbopackなどのテンプレ追加したい
- プルリクお待ちしています!
参考 create-babylon-app - npm https://www.npmjs.com/package/create-babylon-app GitHub https://github.com/drumath2237/create-babylon-app Node.jsでのCLIの作り方と便利なライブラリまとめ https://qiita.com/toshi-toma/items/ea76b8894e7771d47e10 TypeScriptでCLIツールを作って、npmパッケージにする
https://qiita.com/suzuki_sh/items/f3349efbfe1bdfc0c634 inquirer - npm https://www.npmjs.com/package/inquirer