如何安装svelte_Svelte 3入门

本文介绍了Svelte——一个用于命令性代码的高性能组件框架,它在构建时通过转换组件来更新DOM。文章详细讲解了如何构建Svelte应用,包括设置项目、创建组件、理解响应式声明、声明属性以及探索逻辑和绑定。Svelte允许开发者构建高性能应用,其组件创建方式类似于Vue的.js文件。
摘要由CSDN通过智能技术生成

如何安装svelte

介绍 (Introduction)

When building applications with JavaScript, high performance and penetrability will always be at the crux of the decisions made by software developers. Svelte is a high-performance component framework for imperative code.

使用JavaScript构建应用程序时,高性能和可穿透性将始终是软件开发人员做出决定的关键。 Svelte是用于命令性代码的高性能组件框架。

Svelte also brings a different way of scaffolding user interfaces to the table. While React and Vue perform most of their work in the browser, Svelte runs during build time by transforming the application’s component into code that updates the DOM.

Svelte还为表提供了一种不同的方式来搭建用户界面。 尽管ReactVue在浏览器中执行其大部分工作,但Svelte会在构建期间通过将应用程序的组件转换为更新DOM的代码来运行。

This tutorial will cover the basics of Svelte and how you can harness its features to build high performance applications.

本教程将介绍Svelte的基础知识,以及如何利用其功能来构建高性能应用程序。

第1步-构建一个精简的应用程序 (Step 1 — Building a Svelte Application)

The first thing to do when building a Svelte application is to integrate Svelte with a project scaffolding tool. This tutorial will use degit.

构建Svelte应用程序时,要做的第一件事是将Svelte与项目脚手架工具集成在一起。 本教程将使用degit

Navigate to your terminal and run the following command to create a new directory for your application:

导航到您的终端并运行以下命令为您的应用程序创建一个新目录:

  • npx degit sveltjs/template my-svelte-app

    npx degit sveltjs / template my-svelte-app

Move into the new directory:

移至新目录:

  • cd my-svelte-app

    cd my-svelte-app

If you are using NPM, install the dependencies with the following command:

如果使用NPM ,请使用以下命令安装依赖项:

  • npm install

    npm安装

If you are using

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值