UNPKG

phpmetrix

Version:

phpmetrix for Node.js is a wrapper around phpmetrics that allows for integration with build systems like Grunt, Gulp and more!

89 lines (88 loc) 4.85 kB
{ "_args": [ [ "phpmetrix@github:dcarrith/phpmetrix", "/var/www/epa-rfi-laravel/api" ] ], "_from": "dcarrith/phpmetrix", "_id": "phpmetrix@1.0.1", "_inCache": true, "_installable": true, "_location": "/phpmetrix", "_phantomChildren": {}, "_requested": { "hosted": { "directUrl": "https://raw.githubusercontent.com/dcarrith/phpmetrix/master/package.json", "gitUrl": "git://github.com/dcarrith/phpmetrix.git", "httpsUrl": "git+https://github.com/dcarrith/phpmetrix.git", "shortcut": "github:dcarrith/phpmetrix", "ssh": "git@github.com:dcarrith/phpmetrix.git", "sshUrl": "git+ssh://git@github.com/dcarrith/phpmetrix.git", "type": "github" }, "name": "phpmetrix", "raw": "phpmetrix@github:dcarrith/phpmetrix", "rawSpec": "github:dcarrith/phpmetrix", "scope": null, "spec": "github:dcarrith/phpmetrix", "type": "hosted" }, "_requiredBy": [ "#DEV:/" ], "_resolved": "git://github.com/dcarrith/phpmetrix.git#fd542e90e836d6a13dd4979eb082aa8dca2a7d77", "_shasum": "de0293afc3fcdbf217af59ca3b6daab28bb59b12", "_shrinkwrap": null, "_spec": "phpmetrix@github:dcarrith/phpmetrix", "_where": "/var/www/epa-rfi-laravel/api", "author": { "name": "David Carrithers", "url": "https://github.com/dcarrith" }, "bin": { "phpmetrix": "./cli.js" }, "bugs": { "url": "https://github.com/dcarrith/phpmetrix/issues" }, "dependencies": { "async": "^1.4.2" }, "description": "phpmetrix for Node.js is a wrapper around phpmetrics that allows for integration with build systems like Grunt, Gulp and more!", "devDependencies": { "bin-check": "^3.0.0", "chai": "^3.3.0", "mocha": "^2.3.3", "standard": "^5.3.1" }, "engines": { "node": ">=0.10.0" }, "gitHead": "fd542e90e836d6a13dd4979eb082aa8dca2a7d77", "homepage": "https://github.com/dcarrith/phpmetrix#readme", "keywords": [ "code-analysis", "gruntfriendly", "gruntplugin", "gulpfriendly", "gulpplugin", "node", "phpmetrics", "static-analysis" ], "license": "MIT", "main": "index.js", "name": "phpmetrix", "optionalDependencies": {}, "readme": "## phpmetrix\n\n> phpmetrix is a node wrapper around phpmetrics that provides integration with build systems like\n> [Grunt](http://gruntjs.com/), [Gulp](http://gulpjs.com/) and more.\n\n[![npm](https://img.shields.io/npm/v/phpmetrix.svg?style=flat)](https://www.npmjs.com/package/phpmetrix)\n[![Build Status](https://travis-ci.org/dcarrith/phpmetrix.svg?branch=master)](https://travis-ci.org/dcarrith/phpmetrix)\n[![Dependency Status](https://david-dm.org/dcarrith/phpmetrix.svg)](https://david-dm.org/dcarrith/phpmetrix)\n[![devDependency Status](https://david-dm.org/dcarrith/phpmetrix/dev-status.svg)](https://david-dm.org/dcarrith/phpmetrix#info=devDependencies)\n[![Coverage Status](https://coveralls.io/repos/github/dcarrith/phpmetrix/badge.svg?branch=master)](https://coveralls.io/github/dcarrith/phpmetrix?branch=master)\n[![npm](https://img.shields.io/npm/l/express.svg)]()\n\n```sh\n$ npm i -g phpmetrix\n$ phpmetrix path/to/config.yml\n```\n\n### Node\n\n```js\nvar phpmetrix = require('phpmetrix').phpmetrix\n\nphpmetrix(['path/to/config.yml'], function (err, stdout, stderr) {\n if (err) throw new Error(err)\n\n process.stdout.write(stdout)\n process.stderr.write(stderr)\n\n // success!\n})\n```\n\n### NPM\n\n```json\n{\n \"scripts\": {\n \"pretest\": \"phpmetrix path/to/config.yml\"\n },\n \"devDependencies\": { }\n}\n```\n\n```sh\n$ npm test\n```\n\n### Grunt\n\n\n```js\nmodule.exports = function (grunt) {\n require('phpmetrix').gruntPlugin(grunt)\n\n grunt.initConfig({\n phpmetrix: {\n config: 'path/to/config.yml',\n options: {\n phpCmd: '/usr/local/bin/php', // Defaults to php\n phpmetricsCmd: '/usr/local/bin/phpmetrics', // Defaults to phpmetrics\n stdout: true,\n stderr: true\n }\n }\n })\n\n grunt.registerTask('test', ['phpmetrix'])\n\n}\n```\n\n```sh\n$ grunt test\n```\n\n### Gulp\n\nThe same options that can be used in Grunt can be used in Gulp too.\n\n```js\nvar gulp = require('gulp')\nvar phpmetrics = require('phpmetrix').phpmetrics\n\ngulp.task('phpmetrix', function (cb) {\n phpmetrix(['path/to/config.yml'], function (err, stdout, stderr) {\n if (err) {\n cb(err)\n process.exit(1)\n }\n cb()\n })\n})\n\ngulp.task('test', ['phpmetrix'])\n```\n\n```sh\n$ gulp test\n```\n\n#### License\n\n[MIT](http://opensource.org/licenses/MIT) © [David Carrithers](https://github.com/dcarrith)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git://github.com/dcarrith/phpmetrix.git" }, "scripts": { "test": "standard && mocha ./test/test.js" }, "version": "1.0.1" }