1 var path = require('path')
3 var tap = require('tap')
5 var readJson = require('../')
8 name: 'read-package-json',
11 name: 'Isaac Z. Schlueter',
13 url: 'http://blog.izs.me/'
15 description: 'The thing npm uses to read package.json files with semantics and defaults and validation',
18 url: 'git://github.com/isaacs/read-package-json.git'
21 url: 'https://github.com/isaacs/read-package-json/issues'
24 scripts: { test: 'tap test/*.js' },
27 'lru-cache': '~1.1.0',
31 'graceful-fs': '~1.1.8'
33 devDependencies: { tap: '~0.2.5' },
34 homepage: 'https://github.com/isaacs/read-package-json#readme',
35 optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' },
36 _id: 'read-package-json@0.1.1',
37 readme: 'ERROR: No README data found!'
40 tap.test('from css', function (t) {
41 var c = path.join(__dirname, 'fixtures', 'not-json.css')
42 readJson(c, function (er, d) {
48 tap.test('from js', function (t) {
49 readJson(__filename, function (er, d) {
57 "name": "read-package-json",
59 "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
60 "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
63 "url": "git://github.com/isaacs/read-package-json.git"
65 "main": "read-json.js",
67 "test": "tap test/*.js"
71 "lru-cache": "~1.1.0",
78 "optionalDependencies": {
80 "graceful-fs": "~1.1.8"