Skip to content

pantoken / ai/pantoken-ai/src / scaffoldAndInit

関数: scaffoldAndInit()

scaffoldAndInit(platform, dir?, tool?): Promise<string[]>

アルファ

プラットフォーム向けのスタータープロジェクトをスキャフォールドする(@pantoken/scaffold 経由)、および pantoken のエージェント資産(installAgentAssets 経由)を同じディレクトリにインストールする。

パラメーター

platform

string

A ScaffoldPlatform.

dir?

string = "."

ターゲットディレクトリ(デフォルト ".")。そのベース名(または "pantoken-app""." の場合) はスキャフォールドのテンプレートファイル内で に置換されます。

tool?

AgentTool | "all"

スキャフォールドと一緒にインストールするエージェントツールのアセット(デフォルト "all")。

戻り値

Promise<string[]>

書き込まれたパス(スキャフォールドファイルが先)。

React のスターターをスキャフォールドし、すべてのエージェントアセットをインストールする

ts
import { scaffoldAndInit } from "@pantoken/ai";

scaffoldAndInit("react", "./my-app");