Skip to Content
한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
book

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

by 한선용, 이선 브라운
May 2021
Beginner to intermediate
448 pages
9h 47m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것
125
7
핸들바를 이용한 템플릿
7.3
퍼그: 독특한 접근법
대부분의 템플릿 엔진이
HTML
중심적인 접근법을 택한 데 반해, 퍼그
Pug
HTML
의 형태를
제거한다는 점이 독특합니다. 퍼그는 익스프레스 개발자인
TJ
할로웨이척이 만들었기에 익스
프레스와 아주 잘 통합됩니다. 퍼그의 독특한 접근법 뒤에,
HTML
은 손으로 작성하기에 까다
롭고 귀찮은 언어라는 편견이 있습니다. 퍼그 템플릿과 이 템플릿에서 생성하는
HTML
을 잠깐
보고 넘어갑시다. 이 텍스트는 퍼그 홈페이지
2
에서 가져왔고, 책의 형식에 맞게 조금 수정했습
니다.
doctype html <!DOCTYPE html>
html(lang=”en”) <html lang=”en”>
head <head>
title= pageTitle <title>Pug Demo</title>
script. <script>
if (foo) { if (foo) {
bar(1 + 5) bar(1 + 5)
} }
body </script>
<body>
h1 Pug <h1>Pug</h1>
#container <div id=”container”>
if youAreUsingPug
p You are amazing <p>You are amazing</p>
else
p Get on it! ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

한성용, 이선 브라운

Publisher Resources

ISBN: 9791162244227