본문 바로가기
카테고리 없음

[svelte.js] Svelte.js 소개 및 설치방법

2019. 5. 9.
반응형

svelte logo

Svelte란?

Svelte는 웹 애플리케이션을 만드는 새로운 방법을 제시합니다. Declarative Component를 가져와 JavaScript로 변환하여 DOM을 업데이트하는 컴파일러입니다.

'스벨트'라고 읽고 불어로 날씬하다(slender)는 뜻이라고 합니다. 이름처럼 가볍게 만들어졌습니다.

 

React -> Vue -> Svelte 간단 비교

// React
this.setState({ count: this.state.count + 1 })

// Vue
this.count += 1

// Svelte
count += 1

 

설치하기

git clone git@github.com:sveltejs/svelte.git
cd svelte
npm install

컴파일러 빌드

npm run build

코드 변화를 감지하고, 계속해서 패키지를 리빌드하기

npm run dev

컴파일러는 TypeScript로 작성되어졌다고 합니다.

 

Running Tests

npm run test

 

공식홈페이지(https://svelte.dev/)

 

Svelte • Cybernetically enhanced web apps

Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue do the bulk of their work in the browser, Svelte shifts that work into a compile step that happens when you build your app. Instead of using tec

svelte.dev

svelte Github link (https://github.com/sveltejs/svelte)

 

sveltejs/svelte

Cybernetically enhanced web apps. Contribute to sveltejs/svelte development by creating an account on GitHub.

github.com

 

반응형

댓글