Install Pug
- Install Pug Express
- Install Pigeon Spikes
- Install Pug Instead Of Jade
- Install Pugb Mobile
- Pug Documentation
Enable installation callbacks on composer libraries. There is no license information available for the latest version (0.1.3) of this package. If you are using sublime text, adding support to view the pug mark up will be helpful. Just press Command + Shift + P (for Mac) or click on Sublime Text > Preferences > Package Control to open package control. Type 'Install Package'. Then, type in pug. You are good to go. Pug used to be called Jade. In fact, there doesn't seem to be a documentation site with the new name yet. In fact, there doesn't seem to be a documentation site with the new name yet. Looks like jade-lang.com is still the spot to go for docs. How can the answer be improved?
- Getting Started Installation ¶. Pug is available via npm: $ npm install pug Overview ¶. The general rendering process of Pug is simple. Pug.compile() will compile the Pug source code into a JavaScript function that takes a data object (called “locals”) as an argument.
- Make sure you add 'npm install' into terminal after 'npm install pug --save' Posting to the forum is only allowed for members with active accounts. Please sign in or sign up to post.
- I have another app with pug installed, yet now I cannot create a new module installation for some reason. I'm installing pug local to the app into node_modules I'm just trying to get work done, so if I have missed something simple, my stress level has not been helpful with keeping precise vision.
Full documentation is at pugjs.org
Pug is a high performance template engine heavily influenced by Hamland implemented with JavaScript for Node.js and browsers. For bug reports,feature requests and questions, open an issue.For discussion join the chat room.
You can test drive Pug online here.
Rename from 'Jade'
This project was formerly known as 'Jade.' However, it has been revealed to us that 'Jade' is a registered trademark, and as a result a rename is needed. After some discussion among the maintainers, 'Pug' has been chosen as the new name for this project. The next major version will carry 'pug' as the package name.
If your package or app currently uses jade
, don't worry: we have secured permissions to continue to occupy that package name, although all new versions will be released under pug
.
Install Pug Express
Before the renaming, we had already begun working on an incompatible Jade 2.0.0. We have then made it so that this new major version bump will coincide with the rename to Pug. Therefore, upgrading from Jade to Pug will be the same process as upgrading any other package with a major version bump. Currently, Pug 2.0.0 is still under beta stage, and there are several syntactic differences we have deprecated and removed. Such differences are documented at #2305.
The website and documentation for Pug are still being updated, but if you are new to Pug, you should get started with the new syntax and install the Pug package on npm.
Installation
Package
via npm:
Command Line
After installing the latest version of Node.js, install with:
Install Pigeon Spikes
and run with
Syntax
Install Pug Instead Of Jade
Pug is a clean, whitespace sensitive syntax for writing html. Here is a simple example:
becomes
API
For full API, see pugjs.org/api/reference.html
Options
filename
Used in exceptions, and required when using includescompileDebug
Whenfalse
no debug instrumentation is compiledpretty
Add pretty-indentation whitespace to output (false by default)
Install Pugb Mobile
Browser Support
The latest version of pug can be download for the browser in standalone form from here. It only supports the very latest browsers though, and is a large file. It is recommended that you pre-compile your pug templates to JavaScript.
To compile a template for use on the client using the command line, do:
Pug Documentation
which will produce filename.js
containing the compiled template.
Additional Resources
Tutorials:
- cssdeck interactive Pug syntax tutorial
- cssdeck interactive Pug logic tutorial
- Pug について。 (A Japanese Tutorial)
Implementations in other languages:
Other:
- html2pug converter
- pug2php converter
- Pug Server Ideal for building local prototypes apart from any application
- pug-ruby gem: Allows to invoke Pug and Jade from Ruby
- pug-rails gem: Integrates Pug and Jade into your Rails application
License
MIT