New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ltl

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ltl - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

ltl.js

23

package.json

@@ -13,7 +13,11 @@ {

],
"version": "0.0.1",
"main": "lib/ltl",
"version": "0.0.2",
"main": "ltl",
"homepage": "http://github.com/zerious/ltl",
"repository": "git://github.com/zerious/ltl.git",
"author": "Sam Eubank <sameubank@gmail.com>",
"contributors": [
"Sam Eubank <sameubank@gmail.com>",
"Kaushik Shankar <skaushik92@gmail.com>"
],
"engines": [

@@ -23,10 +27,10 @@ "node >= 0.2.6"

"scripts": {
"test": "./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha",
"test-watch": "./node_modules/mocha/bin/mocha --watch",
"mocha": "./node_modules/mocha/bin/mocha",
"view-coverage": "open coverage/lcov-report/index.html",
"test": "mocha",
"retest": "mocha --watch",
"cover": "istanbul cover _mocha",
"report": "open coverage/lcov-report/index.html",
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"perf": "node perf"
},
"dependencies": {
},
"dependencies": {},
"devDependencies": {

@@ -40,4 +44,5 @@ "assert-plus": "~0.1.5",

"markdown": "^0.5.0",
"coffee-script": "^1.7.1"
"coffee-script": "^1.7.1",
"coveralls": "^2.10.0"
}
}
# ltl
[![NPM version](https://badge.fury.io/js/ltl.png)](http://badge.fury.io/js/ltl)
[![Build Status](https://travis-ci.org/zerious/ltl.png?branch=master)](https://travis-ci.org/zerious/ltl)
[![Coverage Status](https://coveralls.io/repos/zerious/ltl/badge.png?branch=master)](https://coveralls.io/r/zerious/ltl)
[![Dependency Status](https://david-dm.org/zerious/ltl.png?theme=shields.io)](https://david-dm.org/zerious/ltl)
The ltl template language (pronounced "little") uses a clean

@@ -44,3 +49,3 @@ [Jade](http://jade-lang.com/reference/)-like syntax to generate

* `name` is the name of the argument that an ltl template receives
from a template that uses it as an abstract template.
from a template that calls it as an abstract template.
(Default: `p`)

@@ -111,2 +116,16 @@

### Untagged Lines
If you want to insert a line of text without wrapping it in a tag,
just start the line with a minus.
```jade
h1
img(src="/logo.png")
- Hello!
```
```html
<h1><img src="/logo.png">Hello!</h1>
```
### Blocks

@@ -118,8 +137,8 @@

Bob Loblaw's Law Blog asks, "Why should YOU go
to jail for a crime someone else noticed?
to jail for a crime someone else noticed?"
```
```html
<div id="blah">
Bob Loblaw's Law Blog asks "Why should YOU go
to jail for a crime someone else noticed?
Bob Loblaw's Law Blog asks, "Why should YOU go
to jail for a crime someone else noticed?"
</div>

@@ -138,2 +157,18 @@ ```

### Comments
Line comments and block comments are added by using `//` as a tag (at
the beginning of a line). Both are ignored.
```jade
h1 Comments
// No one will see this.
p Hello from http://lighter.io/ltl
//
This won't be shown.
Neither will this.
```
```html
<h1>Comments</h1><p>Hello from http://lighter.io/ltl</p>
```
### Interpolation

@@ -199,3 +234,3 @@

You can use builtin objects and whatnot.
You can use builtin JavaScript objects and whatnot.
```jade

@@ -209,8 +244,8 @@ if Math.random() > 0.5

A template can use another template with `use`. To accomplish
A template can call another template with `call`. To accomplish
this, you must compile your templates with `options.name`, and
they will be stored in ltl.cache. The
template that's being `use`d can access the data context.
they will be stored in `ltl.cache`. The template that's being
called can access the data context.
```jade
var temp = ltl.compile('p\n use bold', {name: 'temp'});
var temp = ltl.compile('p\n call bold', {name: 'temp'});
var bold = ltl.compile('b #{text}', {name: 'bold'});

@@ -223,8 +258,9 @@ ltl.cache.temp({text: 'Hi!'});

With `get`, a template can get content from a template that
has used it with `use`. Content that is passed into `get` blocks
is declared with `set`.
With `set` and `get`, a template can get content from a
template that calls it. The calling template declares what
it will pass using `set` blocks, and the called template
reads data with `get` blocks.
```jade
var layout = ltl.compile('#nav\n get nav\n#content\n get content', {name: 'layout'});
var page = ltl.compile('use layout\n set nav\n . Nav\n set content\n . Content', {name: 'page'});
var page = ltl.compile('call layout\n set nav\n . Nav\n set content\n . Content', {name: 'page'});
ltl.cache.page();

@@ -239,3 +275,3 @@ ```

Clone the repository
Clone the repository.
```bash

@@ -245,3 +281,3 @@ $ git clone https://github.com/zerious/ltl.git

Install dependencies
Install dependencies.
```bash

@@ -253,13 +289,13 @@ $ npm install

Run all tests
Run all tests.
```bash
$ mocha
$ npm test
```
Watch for changes
Run tests an rerun them after changes are made.
```bash
$ mocha -w
$ npm run retest
```
Run individual tests
Run individual test files.
```bash

@@ -273,12 +309,12 @@ $ mocha test/api

Test coverage (100% required)
Test coverage (100% required).
```bash
$ npm test --coverage
$ npm run cover
```
View coverage report
View coverage report in a browser (uses Mac OS-friendly `open`).
```bash
$ npm run view-coverage
$ npm run report
```
### Write something awesome and submit a pull request!

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc