Skip to content

pantoken-root / ai/pantoken-ai/src / scaffoldProject

関数: scaffoldProject()

scaffoldProject(platform, dir?, options?): Promise<string[]>

アルファ

pantokenが既にインストールおよび組み込まれた、プラットフォーム向けのスタータープロジェクトを作成します。

パラメーター

platform

string

ScaffoldPlatform の型です。

dir?

string

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

options?

ScaffoldProjectOptions

theme/mode どの @pantoken/css token sheet scaffolded files をインポートするか選択します (デフォルト "rebrand"/"light")、すべてのプラットフォームに適用されます)。 cdn は CDN プロバイダーを選択します canvas-theme-editortheme.css/theme.js は (デフォルトは jsDelivr); 、他のすべてのプラットフォームでは無視されます)。 locale (デフォルト "en") は生成されたマークアップの lang/dir 属性を設定します.

戻り値

Promise<string[]>

書き込まれたパス。

React用のスタータープロジェクトをスキャフォールド

ts
import { scaffoldProject } from "@pantoken/scaffold";

scaffoldProject("react", "./my-app");
scaffoldProject("vue", "./my-vue-app", { theme: "canvas", locale: "hu" });