Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Web Development with Jade
Web Development with Jade
Web Development with Jade
Ebook180 pages43 minutes

Web Development with Jade

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This is a stepby step, tutorialbased book which will enable web developers to explore the functionalities of Jade and learn how to use it to write certain functions and processes for web development.

This book is for web developers with at least a basic understanding of HTML and JavaScript. It will enable you to write an easier form of language that then compiles into HTML.
LanguageEnglish
Release dateMar 26, 2014
ISBN9781783286362
Web Development with Jade

Read more from Seán Lang

Related to Web Development with Jade

Related ebooks

Internet & Web For You

View More

Related articles

Reviews for Web Development with Jade

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Web Development with Jade - Seán Lang

    Table of Contents

    Web Development with Jade

    Credits

    About the Author

    About the Reviewers

    www.PacktPub.com

    Support files, eBooks, discount offers and more

    Why Subscribe?

    Free Access for Packt account holders

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Reader feedback

    Customer support

    Downloading the example code

    Errata

    Piracy

    Questions

    1. What is Jade?

    Markup like poetry

    Why should I preprocess?

    How Jade preprocesses

    Comparison with other preprocessors

    HAML

    PHP

    Jinja2

    Mustache

    Installation instructions

    Compiling Jade

    Summary

    2. Basic Syntax

    Significance of whitespace

    Tags

    Text and blocks of text

    Text on the same line

    Text blocks

    Shorthand text blocks

    Inline HTML

    Attributes

    Passing objects as attributes

    Shorthands

    IDs and classes

    Automatic div

    Comments

    Single line

    Block comments

    Block expansion

    Doctypes

    Summary

    3. Feeding Data into Templates

    Syntax

    Defining variables

    Interpolation everywhere!

    Using variables without interpolation

    Escaping

    Sending the variables to the compiler

    Compiler arg

    Programmatically

    Summary

    4. Logic in Templates

    Adding logic with JavaScript

    If/else

    For loops

    Complex operations

    Built-in logical operators

    If / else / else if

    Unless

    Cases

    Each loops

    While loops

    A warning about interpolation

    Summary

    5. Filters

    The full list

    Template engines

    Stylesheet languages

    Minifiers

    Others

    Examples

    Markdown

    CoffeeScript

    Stylus

    Passing arguments

    Summary

    6. Mixins

    Syntax and mechanics

    Defining mixins

    Calling mixins

    Passing blocks

    Another warning about interpolation

    The arguments object

    Summary

    7. Template Inheritance

    Blocks

    Blocks don't provide encapsulation

    Extends

    Replace

    Append

    Prepend

    Incompatibility

    Extra things in extenders

    Includes

    Static

    Filtered

    Jade

    Summary

    8. Organizing Jade Projects

    General best practices

    Keeping logic out of templates

    Inlining

    Minification

    Removing style-induced redundancy

    Semantic divisions

    Server-side versus client-side rendering

    Client-side rendering

    Server-side rendering

    Build systems

    Summary

    A Closing Note – Contributing Back to Jade

    Index

    Web Development with Jade


    Web Development with Jade

    Copyright © 2014 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: March 2014

    Production Reference: 1200314

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham B3 2PB, UK.

    ISBN 978-1-78328-635-5

    www.packtpub.com

    Cover Image by Aniket Sawant (<aniket_sawant_photography@hotmail.com>)

    Credits

    Author

    Sean Lang

    Reviewers

    Fco. Javier Velasco Arjona

    Dan Williams

    Acquisition Editor

    Sam Birch

    Content Development Editor

    Shaon Basu

    Technical Editor

    Dennis John

    Copy Editors

    Gladson Monteiro

    Sayanee Mukherjee

    Janbal Dharmaraj

    Mradula Hegde

    Kirti Pai

    Adithi Shetty

    Project Coordinator

    Akash Poojary

    Proofreader

    Simran Bhogal

    Indexer

    Tejal R. Soni

    Graphics

    Yuvraj Mannari

    Production Coordinator

    Kyle Albuquerque

    Cover Work

    Kyle Albuquerque

    About the Author

    Sean Lang attends the Milwaukee School of Engineering; he is currently majoring in software engineering. Even though he is a freshman there, he is by no means new to the field. He has been teaching himself software development for the last four years, and during this time, he has done extensive volunteer work for open source software projects. These include roots (a toolkit for building web apps), the Jade template engine, nib (a set of utilities for advanced web page styling), and a myriad of smaller projects. In addition to this, he has been doing freelance web designing and consulting, which is especially convenient

    Enjoying the preview?
    Page 1 of 1