Skip to main content

sv create

sv create 设置一个新的 SvelteKit 项目,并提供 设置附加功能 选项。

¥sv create sets up a new SvelteKit project, with options to setup additional functionality.

用法(Usage)

¥Usage

npx sv create [options] [path]

选项(Options)

¥Options

--template <name>

使用哪个项目模板:

¥Which project template to use:

  • minimal — 为你的新应用搭建基本框架

    ¥minimal — barebones scaffolding for your new app

  • demo — 展示带有猜词游戏的应用,无需 JavaScript 即可运行

    ¥demo — showcase app with a word guessing game that works without JavaScript

  • library — Svelte 库的模板,使用 svelte-package 设置

    ¥library — template for a Svelte library, set up with svelte-package

--types <option>

是否以及如何向项目添加类型检查:

¥Whether and how to add typechecking to the project:

  • ts — 默认为 .ts 文件,对 .svelte 组件使用 lang="ts"

    ¥ts — default to .ts files and use lang="ts" for .svelte components

  • jsdoc — 对类型使用 JSDoc 语法

    ¥jsdoc — use JSDoc syntax for types

--no-types

防止添加类型检查。不推荐!

¥Prevent typechecking from being added. Not recommended!

--no-add-ons

在没有交互式附加组件提示的情况下运行命令

¥Run the command without the interactive add-ons prompt

--no-install

跳过依赖安装

¥Skip dependency installation

上一页 下一页