-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(package): added docs, tests with travis, package details, contri…
…butors
- Loading branch information
Ahmad Nassri
committed
Dec 4, 2016
1 parent
86bfbd0
commit 080628c
Showing
25 changed files
with
167 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
engines: | ||
fixme: | ||
enabled: true | ||
|
||
duplication: | ||
enabled: true | ||
config: | ||
languages: | ||
- javascript | ||
|
||
eslint: | ||
enabled: true | ||
|
||
ratings: | ||
paths: | ||
- lib/** | ||
- test/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
*.log | ||
/lib | ||
/node_modules | ||
/.nyc_output | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright (c) 2015, Ahmad Nassri <[email protected]> | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,49 @@ | ||
# HAR Schema [](https://www.npmjs.com/package/har-schema) | ||
# HAR Schema [![version][npm-version]][npm-url] [![License][npm-license]][license-url] | ||
|
||
JSON Schema for HTTP Archive ([HAR](http://www.softwareishard.com/blog/har-12-spec/)). | ||
> JSON Schema for HTTP Archive ([HAR][spec]). | ||
[](https://travis-ci.org/epoberezkin/har-schema) | ||
[![Build Status][travis-image]][travis-url] | ||
[![Downloads][npm-downloads]][npm-url] | ||
[![Code Climate][codeclimate-quality]][codeclimate-url] | ||
[![Coverage Status][codeclimate-coverage]][codeclimate-url] | ||
[![Dependency Status][dependencyci-image]][dependencyci-url] | ||
[![Dependencies][david-image]][david-url] | ||
|
||
## Install | ||
|
||
```bash | ||
npm install --only=production --save har-schema | ||
``` | ||
|
||
## Usage | ||
|
||
Compatible with any [JSON Schema validation tool][validator]. | ||
|
||
---- | ||
> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) · | ||
> License: [ISC][license-url] · | ||
> Github: [@ahmadnassri](https://github.com/ahmadnassri) · | ||
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri) | ||
[license-url]: http://choosealicense.com/licenses/isc/ | ||
|
||
[travis-url]: https://travis-ci.org/ahmadnassri/har-schema | ||
[travis-image]: https://img.shields.io/travis/ahmadnassri/har-schema.svg?style=flat-square | ||
|
||
[npm-url]: https://www.npmjs.com/package/har-schema | ||
[npm-license]: https://img.shields.io/npm/l/har-schema.svg?style=flat-square | ||
[npm-version]: https://img.shields.io/npm/v/har-schema.svg?style=flat-square | ||
[npm-downloads]: https://img.shields.io/npm/dm/har-schema.svg?style=flat-square | ||
|
||
[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-schema | ||
[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-schema.svg?style=flat-square | ||
[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-schema.svg?style=flat-square | ||
|
||
[david-url]: https://david-dm.org/ahmadnassri/har-schema | ||
[david-image]: https://img.shields.io/david/ahmadnassri/har-schema.svg?style=flat-square | ||
|
||
[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-schema | ||
[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-schema/badge?style=flat-square | ||
|
||
[spec]: https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md | ||
[validator]: https://github.com/ahmadnassri/har-validator |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"version": "0.0.0-development", | ||
"name": "har-schema", | ||
"version": "0.1.0", | ||
"description": "JSON Schema for HTTP Archive (HAR)", | ||
"main": "schema/index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"scripts": { | ||
"test": "mocha test/*.js -R spec" | ||
}, | ||
"author": "Ahmad Nassri <[email protected]> (https://www.ahmadnassri.com/)", | ||
"contributors": [ | ||
"Evgeny Poberezkin <[email protected]>" | ||
], | ||
"homepage": "https://github.com/ahmadnassri/har-schema", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/epoberezkin/har-schema.git" | ||
"url": "https://github.com/ahmadnassri/har-schema.git" | ||
}, | ||
"license": "ISC", | ||
"main": "lib/index.js", | ||
"keywords": [ | ||
"har", | ||
"http", | ||
|
@@ -21,14 +21,34 @@ | |
"schema", | ||
"JSON-schema" | ||
], | ||
"author": "Ahmad Nassri <[email protected]> (https://www.ahmadnassri.com/)", | ||
"license": "ISC", | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/epoberezkin/har-schema/issues" | ||
"url": "https://github.com/ahmadnassri/har-schema/issues" | ||
}, | ||
"scripts": { | ||
"test": "tap test --reporter spec", | ||
"pretest": "snazzy && echint", | ||
"coverage": "tap test --reporter silent --coverage", | ||
"codeclimate": "tap --coverage-report=text-lcov | codeclimate-test-reporter", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"homepage": "https://github.com/epoberezkin/har-schema#readme", | ||
"devDependencies": { | ||
"ajv": "^4.1.7", | ||
"mocha": "^2.5.3" | ||
"ajv": "^4.9.1", | ||
"codeclimate-test-reporter": "^0.4.0", | ||
"cz-conventional-changelog": "^1.2.0", | ||
"echint": "^2.0.0", | ||
"semantic-release": "^6.3.5", | ||
"snazzy": "^5.0.0", | ||
"tap": "^8.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict' | ||
|
||
const schemas = require('../lib') | ||
const Ajv = require('ajv') | ||
const tap = require('tap') | ||
|
||
tap.test('har-schema', (assert) => { | ||
const ajv = new Ajv() | ||
const keys = Object.keys(schemas) | ||
|
||
assert.plan(keys.length * 2) | ||
|
||
keys.forEach((key) => assert.doesNotThrow(ajv.addSchema(schemas[key]))) | ||
keys.forEach((key) => assert.type(ajv.compile(schemas[key]), 'function')) | ||
}) |
This file was deleted.
Oops, something went wrong.