pug
Advanced tools
Comparing version 0.0.0 to 0.1.0
{ | ||
"name": "pug", | ||
"version": "0.0.0", | ||
"description": "Nodejs ORM using Postgres", | ||
"main": "pug.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"description": "A clean, whitespace-sensitive template language for writing HTML", | ||
"version": "0.1.0", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
"maintainers": [ | ||
"Forbes Lindesay <forbes@lindesay.co.uk>", | ||
"Matthias Le Brun <mlbli@me.com>", | ||
"Joshua Appelman <joshua@jbna.nl>", | ||
"Jonathan Ong <jonathanrichardong@gmail.com>", | ||
"Alex Kocharin <alex@kocharin.ru>", | ||
"Hemanth <hemanth.hm@gmail.com>", | ||
"Timothy Gu <timothygu99@gmail.com>", | ||
"Andreas Lubbe <git@lubbe.org>" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/weareflavor/pig.git" | ||
"url": "git://github.com/jadejs/jade" | ||
}, | ||
"author": "Flavor", | ||
"license": "MIT", | ||
"readmeFilename": "README.md", | ||
"gitHead": "7f7d699362b09a010603e8ac7e683d51886881c4", | ||
"main": "lib", | ||
"bin": { | ||
"jade": "./bin/jade.js" | ||
}, | ||
"dependencies": { | ||
"pg": "~2.3.1" | ||
} | ||
"pug-code-gen": "0.0.0", | ||
"pug-filters": "1.1.0", | ||
"pug-lexer": "0.0.0", | ||
"pug-linker": "0.0.0", | ||
"pug-loader": "0.0.0", | ||
"pug-parser": "0.0.0", | ||
"pug-runtime": "0.0.0", | ||
"pug-strip-comments": "0.0.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": "*", | ||
"browserify-middleware": "~4.1.0", | ||
"code-mirror": "~3.22.0", | ||
"coveralls": "^2.11.2", | ||
"doctypes": "^1.0.0", | ||
"express": "^4.10.4", | ||
"github-basic": "^5.0.0", | ||
"highlight-codemirror": "^4.6.1", | ||
"inconsolata": "0.0.2", | ||
"istanbul": "*", | ||
"jade-code-mirror": "~1.0.5", | ||
"jade-highlighter": "~1.0.5", | ||
"jquery": "^2.1.4", | ||
"jstransformer-cdata": "^1.0.0", | ||
"jstransformer-coffee-script": "^1.0.0", | ||
"jstransformer-less": "^2.1.0", | ||
"jstransformer-markdown-it": "^0.2.2", | ||
"jstransformer-stylus": "^1.0.0", | ||
"jstransformer-uglify-js": "^1.1.1", | ||
"jstransformer-verbatim": "^1.0.0", | ||
"less-file": "0.0.9", | ||
"linify": "*", | ||
"lsr": "^1.0.0", | ||
"markdown-it": "^5.0.1", | ||
"mocha": "*", | ||
"pull-request": "^3.0.0", | ||
"rimraf": "^2.2.8", | ||
"should": "*", | ||
"stop": "^3.0.0-rc1", | ||
"stylus": "*", | ||
"twbs": "0.0.6", | ||
"uglify-js": "^2.6.1" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec", | ||
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- -R dot", | ||
"coveralls": "npm run coverage && cat ./coverage/lcov.info | coveralls", | ||
"prepublish": "npm prune && linify transform bin" | ||
}, | ||
"browser": { | ||
"fs": false | ||
}, | ||
"homepage": "http://jade-lang.com" | ||
} |
161
README.md
@@ -1,16 +0,153 @@ | ||
pug | ||
=== | ||
# [![Jade - Node Template Engine](http://garthdb.com/img/jade_branding/jade-01.svg)](http://jade-lang.com/) | ||
Nodejs ORM using Postgres | ||
Full documentation is at [jade-lang.com](http://jade-lang.com/) | ||
![](http://31.media.tumblr.com/67ade45a3d0bb49c10ce239918158649/tumblr_mktmla2iZX1rgpyeqo1_400.gif) | ||
Jade is a high performance template engine heavily influenced by [Haml](http://haml.info/) | ||
and implemented with JavaScript for [node](http://nodejs.org) and browsers. For bug reports, | ||
feature requests and questions, [open an issue](https://github.com/jadejs/jade/issues/new). | ||
For discussion join the [chat room](https://gitter.im/jadejs/jade). | ||
Useage | ||
------ | ||
You can test drive Jade online [here](http://naltatis.github.com/jade-syntax-docs). | ||
var pug = require('pug').init({ | ||
user: process.env.USER || 'yourusername', | ||
database: process.env.DATABASE_URL || 'your_database', | ||
host: process.env.DATABASE_HOST || 'localhost', | ||
port: process.env.DATABASE_PORT || 5432 | ||
}); | ||
[![Build Status](https://img.shields.io/travis/jadejs/jade/master.svg?style=flat)](https://travis-ci.org/jadejs/jade) | ||
[![Coverage Status](https://img.shields.io/coveralls/jadejs/jade/master.svg?style=flat)](https://coveralls.io/r/jadejs/jade?branch=master) | ||
[![Dependency Status](https://img.shields.io/david/jadejs/jade.svg?style=flat)](https://david-dm.org/jadejs/jade) | ||
[![devDependencies Status](https://img.shields.io/david/dev/jadejs/jade.svg?style=flat)](https://david-dm.org/jadejs/jade#info=devDependencies) | ||
[![NPM version](https://img.shields.io/npm/v/jade.svg?style=flat)](http://badge.fury.io/js/jade) | ||
[![Join Gitter Chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/jadejs/jade?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
## Installation | ||
via npm: | ||
```bash | ||
$ npm install jade | ||
``` | ||
## Syntax | ||
Jade is a clean, whitespace sensitive syntax for writing html. Here is a simple example: | ||
```jade | ||
doctype html | ||
html(lang="en") | ||
head | ||
title= pageTitle | ||
script(type='text/javascript'). | ||
if (foo) bar(1 + 5) | ||
body | ||
h1 Jade - node template engine | ||
#container.col | ||
if youAreUsingJade | ||
p You are amazing | ||
else | ||
p Get on it! | ||
p. | ||
Jade is a terse and simple templating language with a | ||
strong focus on performance and powerful features. | ||
``` | ||
becomes | ||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Jade</title> | ||
<script type="text/javascript"> | ||
if (foo) bar(1 + 5) | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Jade - node template engine</h1> | ||
<div id="container" class="col"> | ||
<p>You are amazing</p> | ||
<p>Jade is a terse and simple templating language with a strong focus on performance and powerful features.</p> | ||
</div> | ||
</body> | ||
</html> | ||
``` | ||
The official [jade tutorial](http://jade-lang.com/tutorial/) is a great place to start. While that (and the syntax documentation) is being finished, you can view some of the old documentation [here](https://github.com/jadejs/jade/blob/master/jade.md) and [here](https://github.com/jadejs/jade/blob/master/jade-language.md) | ||
## API | ||
For full API, see [jade-lang.com/api](http://jade-lang.com/api/) | ||
```js | ||
var jade = require('jade'); | ||
// compile | ||
var fn = jade.compile('string of jade', options); | ||
var html = fn(locals); | ||
// render | ||
var html = jade.render('string of jade', merge(options, locals)); | ||
// renderFile | ||
var html = jade.renderFile('filename.jade', merge(options, locals)); | ||
``` | ||
### Options | ||
- `filename` Used in exceptions, and required when using includes | ||
- `compileDebug` When `false` no debug instrumentation is compiled | ||
- `pretty` Add pretty-indentation whitespace to output _(false by default)_ | ||
## Browser Support | ||
The latest version of jade can be download for the browser in standalone form from [here](https://raw.githubusercontent.com/jadejs/jade/1.11.0/jade.js). It only supports the very latest browsers though, and is a large file. It is recommended that you pre-compile your jade templates to JavaScript and then just use the [runtime.js](https://raw.githubusercontent.com/jadejs/jade/1.11.0/runtime.js) library on the client. | ||
To compile a template for use on the client using the command line, do: | ||
```console | ||
$ jade --client --no-debug filename.jade | ||
``` | ||
which will produce `filename.js` containing the compiled template. | ||
## Command Line | ||
After installing the latest version of [node](http://nodejs.org/), install with: | ||
```console | ||
$ npm install jade -g | ||
``` | ||
and run with | ||
```console | ||
$ jade --help | ||
``` | ||
## Additional Resources | ||
Tutorials: | ||
- cssdeck interactive [Jade syntax tutorial](http://cssdeck.com/labs/learning-the-jade-templating-engine-syntax) | ||
- cssdeck interactive [Jade logic tutorial](http://cssdeck.com/labs/jade-templating-tutorial-codecast-part-2) | ||
- [Jade について。](https://gist.github.com/japboy/5402844) (A Japanese Tutorial) | ||
- [Jade - 模板引擎](https://github.com/jadejs/jade/blob/master/Readme_zh-cn.md) | ||
Implementations in other languages: | ||
- [php](http://github.com/everzet/jade.php) | ||
- [scala](http://scalate.fusesource.org/versions/snapshot/documentation/scaml-reference.html) | ||
- [ruby](https://github.com/slim-template/slim) | ||
- [python](https://github.com/SyrusAkbary/pyjade) | ||
- [java](https://github.com/neuland/jade4j) | ||
Other: | ||
- [Emacs Mode](https://github.com/brianc/jade-mode) | ||
- [Vim Syntax](https://github.com/digitaltoad/vim-jade) | ||
- [TextMate Bundle](http://github.com/miksago/jade-tmbundle) | ||
- [Coda/SubEtha syntax Mode](https://github.com/aaronmccall/jade.mode) | ||
- [html2jade](https://github.com/donpark/html2jade) converter | ||
- [jade2php](https://github.com/SE7ENSKY/jade2php) converter | ||
- [Jade Server](https://github.com/ded/jade-server) Ideal for building local prototypes apart from any application | ||
## License | ||
MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
88095
12
403
1
154
8
32
1
6
3
+ Addedpug-code-gen@0.0.0
+ Addedpug-filters@1.1.0
+ Addedpug-lexer@0.0.0
+ Addedpug-linker@0.0.0
+ Addedpug-loader@0.0.0
+ Addedpug-parser@0.0.0
+ Addedpug-runtime@0.0.0
+ Addedpug-strip-comments@0.0.1
+ Added@types/babel-types@7.0.15(transitive)
+ Added@types/babylon@6.16.9(transitive)
+ Addedacorn@2.7.03.3.04.0.13(transitive)
+ Addedacorn-globals@3.1.0(transitive)
+ Addedalign-text@0.1.4(transitive)
+ Addedamdefine@1.0.1(transitive)
+ Addedasap@2.0.6(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcamelcase@1.2.1(transitive)
+ Addedcenter-align@0.1.3(transitive)
+ Addedcharacter-parser@2.2.0(transitive)
+ Addedclean-css@3.4.28(transitive)
+ Addedcliui@2.1.0(transitive)
+ Addedcommander@2.8.1(transitive)
+ Addedconstantinople@3.1.2(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddoctypes@1.1.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedgraceful-readlink@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.14.0(transitive)
+ Addedis-expression@1.0.2(transitive)
+ Addedis-promise@2.2.2(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedjs-stringify@1.0.2(transitive)
+ Addedjstransformer@0.0.3(transitive)
+ Addedkind-of@3.2.2(transitive)
+ Addedlazy-cache@1.0.4(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlongest@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpromise@7.3.1(transitive)
+ Addedpug-attrs@0.0.0(transitive)
+ Addedpug-code-gen@0.0.0(transitive)
+ Addedpug-error@0.0.0(transitive)
+ Addedpug-filters@1.1.0(transitive)
+ Addedpug-lexer@0.0.0(transitive)
+ Addedpug-linker@0.0.0(transitive)
+ Addedpug-loader@0.0.0(transitive)
+ Addedpug-parser@0.0.0(transitive)
+ Addedpug-runtime@0.0.0(transitive)
+ Addedpug-strip-comments@0.0.1(transitive)
+ Addedpug-walk@0.0.0(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedright-align@0.1.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsource-map@0.4.40.5.7(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedto-fast-properties@1.0.3(transitive)
+ Addedtoken-stream@0.0.1(transitive)
+ Addeduglify-js@2.8.29(transitive)
+ Addeduglify-to-browserify@1.0.2(transitive)
+ Addedvoid-elements@2.0.1(transitive)
+ Addedwindow-size@0.1.0(transitive)
+ Addedwith@5.1.1(transitive)
+ Addedwordwrap@0.0.2(transitive)
+ Addedyargs@3.10.0(transitive)
- Removedpg@~2.3.1
- Removedbuffer-writer@1.0.0(transitive)
- Removedgeneric-pool@2.0.3(transitive)
- Removedpg@2.3.1(transitive)