pug-filters
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "pug-filters", | ||
"version": "1.1.0", | ||
"description": "Code for processing filters in jade templates", | ||
"version": "1.1.1", | ||
"description": "Code for processing filters in pug templates", | ||
"keywords": [ | ||
"jade" | ||
"pug" | ||
], | ||
@@ -11,4 +11,4 @@ "dependencies": { | ||
"constantinople": "^3.0.1", | ||
"pug-error": "^0.0.0", | ||
"pug-walk": "^0.0.0", | ||
"pug-error": "^1.3.0", | ||
"pug-walk": "^0.0.3", | ||
"jstransformer": "0.0.3", | ||
@@ -20,4 +20,4 @@ "resolve": "^1.1.6", | ||
"get-repo": "^1.0.0", | ||
"pug-lexer": "^0.0.0", | ||
"pug-parser": "^0.0.0", | ||
"pug-lexer": "^1.0.0", | ||
"pug-parser": "^1.0.0", | ||
"jstransformer-cdata": "^1.0.0", | ||
@@ -36,6 +36,6 @@ "jstransformer-coffee-script": "^1.0.0", | ||
"type": "git", | ||
"url": "https://github.com/jadejs/jade-filters.git" | ||
"url": "https://github.com/pugjs/pug-filters.git" | ||
}, | ||
"author": "Forbes Lindesay", | ||
"license": "MIT" | ||
} | ||
} |
@@ -1,12 +0,12 @@ | ||
# jade-filters | ||
# pug-filters | ||
Code for processing filters in jade templates | ||
Code for processing filters in pug templates | ||
[![Build Status](https://img.shields.io/travis/jadejs/jade-filters/master.svg)](https://travis-ci.org/jadejs/jade-filters) | ||
[![Dependency Status](https://img.shields.io/gemnasium/jadejs/jade-filters.svg)](https://gemnasium.com/jadejs/jade-filters) | ||
[![NPM version](https://img.shields.io/npm/v/jade-filters.svg)](https://www.npmjs.org/package/jade-filters) | ||
[![Build Status](https://img.shields.io/travis/pugjs/pug-filters/master.svg)](https://travis-ci.org/pugjs/pug-filters) | ||
[![Dependency Status](https://img.shields.io/gemnasium/pugjs/pug-filters.svg)](https://gemnasium.com/pugjs/pug-filters) | ||
[![NPM version](https://img.shields.io/npm/v/pug-filters.svg)](https://www.npmjs.org/package/pug-filters) | ||
## Installation | ||
npm install jade-filters | ||
npm install pug-filters | ||
@@ -16,3 +16,3 @@ ## Usage | ||
``` | ||
var filters = require('jade-filters'); | ||
var filters = require('pug-filters'); | ||
``` | ||
@@ -22,3 +22,3 @@ | ||
Renders all `Filter` nodes in a Jade AST (`ast`), using user-specified filters (`filters`) or a JSTransformer. | ||
Renders all `Filter` nodes in a Pug AST (`ast`), using user-specified filters (`filters`) or a JSTransformer. | ||
@@ -25,0 +25,0 @@ ### `filters.runFilter(name, str[, options[, currentDirectory]])` |
{ | ||
"msg": "\"opt\" is not constant. All filters are rendered compile-time so filter options must be constants.", | ||
"code": "JADE:FILTER_OPTION_NOT_CONSTANT", | ||
"code": "PUG:FILTER_OPTION_NOT_CONSTANT", | ||
"line": 2 | ||
} |
@@ -49,3 +49,3 @@ 'use strict'; | ||
} catch (ex) { | ||
if (!ex || !ex.code || !ex.code.indexOf('JADE:') === 0) throw ex; | ||
if (!ex || !ex.code || !ex.code.indexOf('PUG:') === 0) throw ex; | ||
actual = { | ||
@@ -52,0 +52,0 @@ msg: ex.msg, |
@@ -19,3 +19,3 @@ 'use strict'; | ||
} catch (ex) { | ||
if (!ex || !ex.code || !ex.code.indexOf('JADE:') === 0) throw ex; | ||
if (!ex || !ex.code || !ex.code.indexOf('PUG:') === 0) throw ex; | ||
return { | ||
@@ -29,3 +29,3 @@ msg: ex.msg, | ||
getRepo('jadejs', 'jade-parser').on('data', function (entry) { | ||
getRepo('pugjs', 'pug-parser').on('data', function (entry) { | ||
var match; | ||
@@ -75,6 +75,6 @@ if (entry.type === 'File' && (match = /^\/test\/cases\/(filters.*)\.expected\.json$/.exec(entry.path))) { | ||
}); | ||
var jadeRe = /\.jade$/; | ||
var pugRe = /\.pug$/; | ||
fs.readdirSync(__dirname + '/errors-src').forEach(function (name) { | ||
if (!jadeRe.test(name)) return; | ||
name = name.replace(jadeRe, ''); | ||
if (!pugRe.test(name)) return; | ||
name = name.replace(pugRe, ''); | ||
var filename = name + '.input.json'; | ||
@@ -90,3 +90,3 @@ var alreadyExists = false; | ||
if (alreadyExists) { | ||
var actualTokens = parse(lex(fs.readFileSync(__dirname + '/errors-src/' + name + '.jade', 'utf8'))); | ||
var actualTokens = parse(lex(fs.readFileSync(__dirname + '/errors-src/' + name + '.pug', 'utf8'))); | ||
try { | ||
@@ -109,3 +109,3 @@ var expectedTokens = JSON.parse(fs.readFileSync(__dirname + '/errors/' + filename, 'utf8')); | ||
console.log('create: ' + filename); | ||
var ast = parse(lex(fs.readFileSync(__dirname + '/errors-src/' + name + '.jade', 'utf8'))); | ||
var ast = parse(lex(fs.readFileSync(__dirname + '/errors-src/' + name + '.pug', 'utf8'))); | ||
fs.writeFileSync(__dirname + '/errors/' + filename, JSON.stringify(ast, null, 2)); | ||
@@ -112,0 +112,0 @@ console.log('create: ' + name + '.expected.json'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54281
+ Addedpug-error@1.3.3(transitive)
+ Addedpug-walk@0.0.3(transitive)
- Removedpug-error@0.0.0(transitive)
- Removedpug-walk@0.0.0(transitive)
Updatedpug-error@^1.3.0
Updatedpug-walk@^0.0.3