pug-error
Advanced tools
Comparing version 0.0.0 to 1.3.0
@@ -28,8 +28,8 @@ 'use strict'; | ||
}).join('\n'); | ||
fullMessage = (filename || 'Jade') + ':' + location + '\n' + context + '\n\n' + message; | ||
fullMessage = (filename || 'Pug') + ':' + location + '\n' + context + '\n\n' + message; | ||
} else { | ||
fullMessage = (filename || 'Jade') + ':' + location + '\n\n' + message; | ||
fullMessage = (filename || 'Pug') + ':' + location + '\n\n' + message; | ||
} | ||
var err = new Error(fullMessage); | ||
err.code = 'JADE:' + code; | ||
err.code = 'PUG:' + code; | ||
err.msg = message; | ||
@@ -36,0 +36,0 @@ err.line = line; |
{ | ||
"name": "pug-error", | ||
"version": "0.0.0", | ||
"description": "Standard error objects for jade", | ||
"version": "1.3.0", | ||
"description": "Standard error objects for pug", | ||
"keywords": [ | ||
"jade", | ||
"pug" | ||
@@ -22,6 +21,6 @@ ], | ||
"type": "git", | ||
"url": "https://github.com/jadejs/jade-error.git" | ||
"url": "https://github.com/pugjs/pug-error.git" | ||
}, | ||
"author": "Forbes Lindesay", | ||
"license": "MIT" | ||
} | ||
} |
@@ -1,12 +0,12 @@ | ||
# jade-error | ||
# pug-error | ||
Standard error objects for jade. This module is intended for use by the lexer, parser, loader, linker, code-generator and any plugins. | ||
Standard error objects for pug. This module is intended for use by the lexer, parser, loader, linker, code-generator and any plugins. | ||
[![Build Status](https://img.shields.io/travis/jadejs/jade-error/master.svg)](https://travis-ci.org/jadejs/jade-error) | ||
[![Dependency Status](https://img.shields.io/gemnasium/jadejs/jade-error.svg)](https://gemnasium.com/jadejs/jade-error) | ||
[![NPM version](https://img.shields.io/npm/v/jade-error.svg)](https://www.npmjs.org/package/jade-error) | ||
[![Build Status](https://img.shields.io/travis/pugjs/pug-error/master.svg)](https://travis-ci.org/pugjs/pug-error) | ||
[![Dependency Status](https://img.shields.io/gemnasium/pugjs/pug-error.svg)](https://gemnasium.com/pugjs/pug-error) | ||
[![NPM version](https://img.shields.io/npm/v/pug-error.svg)](https://www.npmjs.org/package/pug-error) | ||
## Installation | ||
npm install jade-error | ||
npm install pug-error | ||
@@ -16,3 +16,3 @@ ## Usage | ||
```js | ||
var error = require('jade-error'); | ||
var error = require('pug-error'); | ||
``` | ||
@@ -22,3 +22,3 @@ | ||
Create a Jade error object. | ||
Create a Pug error object. | ||
@@ -34,3 +34,3 @@ `code` is a required unique code for the error type that can be used to pinpoint a certain error. | ||
- `column`: the offending column | ||
- `src`: the Jade source, if available, for pretty-printing the error context | ||
- `src`: the Pug source, if available, for pretty-printing the error context | ||
@@ -42,6 +42,6 @@ The resulting error object is a simple Error object with additional properties given in the arguments. | ||
```js | ||
var error = require('jade-error'); | ||
var error = require('pug-error'); | ||
var err = error('MY_CODE', 'My message', {line: 3, filename: 'myfile', src: 'foo\nbar\nbaz\nbash\nbing'}); | ||
// { code: 'JADE:MY_CODE', | ||
// { code: 'PUG:MY_CODE', | ||
// msg: 'My message', | ||
@@ -48,0 +48,0 @@ // line: 3, |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
4606