Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Babylon.jsユーザのためのCLIを軽率にnpmで公開した話 / about creat...
Search
にー兄さん
July 05, 2023
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Babylon.jsユーザのためのCLIを軽率にnpmで公開した話 / about create babylon app CLI
Babylon.jsゆるほめLT会 vol2で登壇した資料です
にー兄さん
July 05, 2023
More Decks by にー兄さん
See All by にー兄さん
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
0
13
ついにAuraも登場したのでJetpack XR SDKについて今一度語りたい / i wanna talk about xreal aura
drumath2237
0
41
『Ground Truth: How We Create Geometrically Accurate Reconstructions (Niantic Spatial Blog)』 を読む / read Ground Truth: How We Create Geometrically Accurate Reconstructions
drumath2237
0
77
この時代にOSS開発に向き合ってみる / face the oss development in this era
drumath2237
0
63
プログラマの職能が代替可能になりつつあるこの時代でプログラムと向き合う修行を積む / dedicating myself to the discipline of programming
drumath2237
0
110
個人的3D Gaussian Splattingニュースをご紹介 / sharing 3d gaussian splatting news
drumath2237
0
650
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
850
XRエンジニアの視点から XRのイマと社会実装の実現について考える / thinking-about-xr-popularization
drumath2237
0
96
軽率にプログラミング言語のシンタックスについて考えてみよう / lets-think-about-programming-lang-syntax
drumath2237
0
150
Other Decks in Programming
See All in Programming
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
340
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
710
Java 27新機能 / Java 27 new features
kishida
2
140
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
170
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
260
AHC070解法紹介
eijirou
0
120
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
1.9k
速習iPhone Duo対応
yuukiw00w
1
480
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
110
iOSDC2026登壇資料.pdf
riofujimon
0
160
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
110
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
330
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
The SEO identity crisis: Don't let AI make you average
varn
0
560
How STYLIGHT went responsive
nonsquared
100
6.3k
From π to Pie charts
rasagy
1
370
Utilizing Notion as your number one productivity tool
mfonobong
4
590
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
590
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
4 Signs Your Business is Dying
shpigford
187
23k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
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