bootprint-json-schema
Advanced tools
Comparing version 2.0.0-rc.3 to 4.0.0
@@ -1,28 +0,18 @@ | ||
# Release notes | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
<a name="current-release"></a> | ||
# Version 2.0.0-rc.3 (Sun, 06 Aug 2017 13:16:33 GMT) | ||
# 4.0.0 (2019-12-30) | ||
* [d40ed07](https://github.com/bootprint/bootprint-json-schema/commit/d40ed07) Update documentation - Nils Knappmeier | ||
* [3192776](https://github.com/bootprint/bootprint-json-schema/commit/3192776) Add tests for multipleOf for draft-04 and -06 - Nils Knappmeier | ||
* [cadc7e6](https://github.com/bootprint/bootprint-json-schema/commit/cadc7e6) Support for JSON-schema draft-05 - Nils Knappmeier | ||
**Note:** Version bump only for package bootprint-json-schema | ||
# Version 2.0.0-rc.2 (Sat, 05 Aug 2017 22:41:02 GMT) | ||
* [955e501](https://github.com/bootprint/bootprint-json-schema/commit/955e501) Update documentation - Nils Knappmeier | ||
* [c947822](https://github.com/bootprint/bootprint-json-schema/commit/c947822) Update documentation by running "npm run thought" - Nils Knappmeier | ||
* [8040014](https://github.com/bootprint/bootprint-json-schema/commit/8040014) BREAKING: Complete rewrite of all partials, templates and helpers - Nils Knappmeier | ||
# Version 2.0.0-rc.1 (Sun, 25 Jun 2017 22:01:12 GMT) | ||
* [01e6d2b](https://github.com/bootprint/bootprint-json-schema/commit/01e6d2b) Bump version of bootprint-base to get better helper docs - Nils Knappmeier | ||
* [3867ef7](https://github.com/bootprint/bootprint-json-schema/commit/3867ef7) Measures to increase test-coverage - Nils Knappmeier | ||
* [1b5605f](https://github.com/bootprint/bootprint-json-schema/commit/1b5605f) BREAKING: Remove unused helpers 'json_schema__subschema_name' and 'json_schema__resolve_ref' - Nils Knappmeier | ||
* [287afa2](https://github.com/bootprint/bootprint-json-schema/commit/287afa2) Remove empty obsolete test-file - Nils Knappmeier | ||
* [814d86a](https://github.com/bootprint/bootprint-json-schema/commit/814d86a) BREAKING: Refactor helper names to be valid JavaScript function names - Nils Knappmeier | ||
* [038a06b](https://github.com/bootprint/bootprint-json-schema/commit/038a06b) Bump dependency versions and adapt, update docs and chore - Nils Knappmeier | ||
* [9f42f0e](https://github.com/bootprint/bootprint-json-schema/commit/9f42f0e) Prepare next version - Nils Knappmeier | ||
* [0225c10](https://github.com/bootprint/bootprint-json-schema/commit/0225c10) Update dependencies to enable Greenkeeper 🌴 (#11) - greenkeeper[bot] | ||
# Release notes | ||
<a name="current-release"></a> | ||
# Version 1.1.0 (Mon, 13 Feb 2017 21:33:41 GMT) | ||
@@ -29,0 +19,0 @@ |
27
index.js
@@ -1,19 +0,14 @@ | ||
var path = require('path') | ||
const path = require('path') | ||
// Export function to create new config (builder is passed in from outside) | ||
module.exports = function (builder) { | ||
return builder | ||
.load(require('bootprint-base')) | ||
.merge({ | ||
'handlebars': { | ||
'partials': path.join(__dirname, 'handlebars/partials'), | ||
'helpers': require.resolve('./handlebars/helpers/index.js') | ||
}, | ||
'less': { | ||
'main': [ | ||
require.resolve('./less/theme.less'), | ||
require.resolve('./less/variables.less') | ||
] | ||
} | ||
}) | ||
module.exports = function(builder) { | ||
return builder.load(require('bootprint-base')).merge({ | ||
handlebars: { | ||
partials: path.join(__dirname, 'handlebars/partials'), | ||
helpers: require.resolve('./handlebars/helpers.js') | ||
}, | ||
less: { | ||
main: [require.resolve('./less/theme.less'), require.resolve('./less/variables.less')] | ||
} | ||
}) | ||
} | ||
@@ -20,0 +15,0 @@ |
{ | ||
"publishConfig": { | ||
"tag": "next" | ||
}, | ||
"name": "bootprint-json-schema", | ||
"version": "2.0.0-rc.3", | ||
"version": "4.0.0", | ||
"description": "Converts a json-schema into a static html page", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint --fix .", | ||
"test": "mocha --recursive && npm run lint", | ||
"coverage": "rm coverage -rf && istanbul cover --dir coverage/mocha ./node_modules/.bin/_mocha --print none -- --recursive", | ||
"postcoverage": "istanbul report --root coverage text-summary html && istanbul check-coverage --statements 100", | ||
"test": "mocha --recursive", | ||
"thought": "thought run -a", | ||
"version": "thoughtful changelog -o -a && npm run thought" | ||
"version": "yarn thought" | ||
}, | ||
"preferGlobal": true, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/bootprint/bootprint-json-schema.git" | ||
"author": { | ||
"name": "Nils Knappmeier", | ||
"email": "npm@knappi.org", | ||
"url": "https://github.com/nknapp" | ||
}, | ||
"author": "Nils Knappmeier", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/bootprint/bootprint-json-schema/issues" | ||
}, | ||
"homepage": "https://github.com/bootprint/bootprint-json-schema", | ||
"dependencies": { | ||
"bootprint-base": "^2.0.0-rc.2", | ||
"handlebars": "^4.0.10", | ||
"highlight.js": "^9.12.0" | ||
"bootprint-base": "^4.0.0", | ||
"lodash": "^4.17.2" | ||
}, | ||
"devDependencies": { | ||
"bootprint-unit-testing": "^2.2.0", | ||
"chai": "^4.0.2", | ||
"chai-as-promised": "^7.0.0", | ||
"dirty-chai": "^2.0.0", | ||
"eslint": "^4.1.0", | ||
"eslint-config-standard": "^10.2.1", | ||
"eslint-plugin-import": "^2.6.0", | ||
"eslint-plugin-node": "^5.0.0", | ||
"eslint-plugin-promise": "^3.5.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^3.4.2", | ||
"thought": "^1.5.0", | ||
"thought-plugin-bootprint": "^1.0.1", | ||
"thoughtful-release": "^0.3.1", | ||
"trace-and-clarify-if-possible": "^1.0.0" | ||
}, | ||
"peerDependencies": { | ||
"bootprint": "^2.0.0" | ||
"bootprint": "^2.0.1" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"files": [ | ||
@@ -61,3 +29,17 @@ "handlebars", | ||
"index.js" | ||
] | ||
], | ||
"devDependencies": { | ||
"bootprint": "^4.0.0", | ||
"bootprint-unit-testing": "^4.0.0", | ||
"handlebars": "^4.0.6" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/bootprint/bootprint-monorepo.git", | ||
"directory": "packages/bootprint-json-schema" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/bootprint/bootprint-monorepo/issues" | ||
}, | ||
"gitHead": "a78077487af03afadc610fa94581b1a7f3db5d04" | ||
} |
# bootprint-json-schema | ||
[![NPM version](https://img.shields.io/npm/v/bootprint-json-schema.svg)](https://npmjs.com/package/bootprint-json-schema) | ||
[![Travis Build Status](https://travis-ci.org/bootprint/bootprint-json-schema.svg?branch=master)](https://travis-ci.org/bootprint/bootprint-json-schema) | ||
[![Coverage Status](https://img.shields.io/codecov/bootprint/bootprint-json-schema.svg)](https://codecov.io/github/bootprint/bootprint-json-schema) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/bootprint/bootprint-json-schema.svg)](https://greenkeeper.io/) | ||
> Converts a json-schema into a static html page | ||
This bootprint-module can be used to convert a json-schema to a human-readbable HTML. | ||
## Features | ||
* Complete support for the keywords from JSON-schema [draft-04](https://tools.ietf.org/html/draft-fge-json-schema-validation-00), [draft-05](https://tools.ietf.org/html/draft-wright-json-schema-validation-00) and [draft-06](https://tools.ietf.org/html/draft-wright-json-schema-validation-01) | ||
* Links to the specification for all keywords | ||
* Full test coverage of JavaScript-code | ||
* Lots of tests to cover Handlebars templates and partials | ||
This module is meant for use with the [bootprint](https://npmjs.com/package/bootprint) module: | ||
# Installation | ||
``` | ||
npm -g install bootprint | ||
npm -g install bootprint-json-schema | ||
``` | ||
## Usage | ||
After installing the package globally, you can run bootprint with the command | ||
```bash | ||
bootprint json-schema https://raw.githubusercontent.com/bootprint/bootprint-json-schema/v2.0.0-rc.3/examples/example.json target | ||
npm install -g bootprint | ||
npm install -g bootprint-json-schema | ||
bootprint json-schema http://json-schema.org/schema target | ||
``` | ||
`example.json` can be found in [examples/example.json](examples/example.json) in this project. | ||
It is a copy of the [fstab-example](http://json-schema.org/example2.html) from the JSON-schema documentation, licensed under the AFL or BSD license. | ||
The directory "target" should now contain a file `index.html` and `main.css` which contain a readble | ||
form of the [Core/Validation Meta-Schema](http://json-schema.org). | ||
Bootprint will then generate the following files: | ||
<pre><code>examples/target/ | ||
├── index.html | ||
├── main.css | ||
└── main.css.map | ||
</code></pre> | ||
## Customizing | ||
You can write your own module that customizes the partials and helpers in this module | ||
(see [the bootprint documentation](https://github.com/bootprint/bootprint/blob/master/doc/modules.md)) for details. | ||
The entrypoint JavaScript-file of such a module would look like. | ||
```js | ||
module.exports = function (customize) { | ||
return customize | ||
.load(require('bootprint-json-schema')) | ||
.merge({ | ||
// You customizations here | ||
}) | ||
// Add "package" metadata. This can be evaluated by documentation generators | ||
module.exports.package = require('./package') | ||
``` | ||
# API | ||
see [docs/api.md](docs/api.md) | ||
# License | ||
@@ -75,0 +23,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3
3
20812
20
110
35
1
+ Addedlodash@^4.17.2
+ Added@sindresorhus/is@2.1.1(transitive)
+ Added@szmarczak/http-timer@4.0.6(transitive)
+ Added@types/cacheable-request@6.0.3(transitive)
+ Added@types/http-cache-semantics@4.0.4(transitive)
+ Added@types/keyv@3.1.4(transitive)
+ Added@types/responselike@1.0.3(transitive)
+ Addedanymatch@3.1.3(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbootprint@4.0.4(transitive)
+ Addedbootprint-base@4.0.4(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedcacheable-lookup@2.0.1(transitive)
+ Addedcacheable-request@7.0.4(transitive)
+ Addedcheerio@0.22.0(transitive)
+ Addedchokidar@3.6.0(transitive)
+ Addedclone-response@1.0.3(transitive)
+ Addedcommander@4.1.1(transitive)
+ Addedcopy-anything@2.0.6(transitive)
+ Addedcss-select@1.2.0(transitive)
+ Addedcss-what@2.1.3(transitive)
+ Addedcustomize@4.0.4(transitive)
+ Addedcustomize-engine-handlebars@4.0.4(transitive)
+ Addedcustomize-engine-less@4.0.4(transitive)
+ Addedcustomize-write-files@4.0.4(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddecompress-response@5.0.0(transitive)
+ Addeddefer-to-connect@2.0.1(transitive)
+ Addeddom-serializer@0.1.1(transitive)
+ Addeddomelementtype@1.3.1(transitive)
+ Addeddomhandler@2.4.2(transitive)
+ Addeddomutils@1.5.1(transitive)
+ Addedduplexer3@0.1.5(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedentities@1.1.2(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfs-extra@8.1.0(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedget-stream@5.2.0(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedgot@10.7.0(transitive)
+ Addedhtmlparser2@3.10.1(transitive)
+ Addedhttp-cache-semantics@4.1.1(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedis-what@3.14.1(transitive)
+ Addedjson-buffer@3.0.1(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedkeyv@4.5.4(transitive)
+ Addedless@3.13.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlodash.assignin@4.2.0(transitive)
+ Addedlodash.bind@4.2.1(transitive)
+ Addedlodash.defaults@4.2.0(transitive)
+ Addedlodash.filter@4.6.0(transitive)
+ Addedlodash.flatten@4.4.0(transitive)
+ Addedlodash.foreach@4.5.0(transitive)
+ Addedlodash.map@4.6.0(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedlodash.pick@4.4.0(transitive)
+ Addedlodash.reduce@4.6.0(transitive)
+ Addedlodash.reject@4.6.0(transitive)
+ Addedlodash.some@4.6.0(transitive)
+ Addedlowercase-keys@2.0.0(transitive)
+ Addedmake-dir@2.1.0(transitive)
+ Addedmarked@0.8.2(transitive)
+ Addedmimic-response@1.0.12.1.0(transitive)
+ Addednative-request@1.1.2(transitive)
+ Addednormalize-path@3.0.0(transitive)
+ Addednormalize-url@6.1.0(transitive)
+ Addednth-check@1.0.2(transitive)
+ Addedp-cancelable@2.1.1(transitive)
+ Addedp-event@4.2.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedp-timeout@3.2.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedresponselike@2.0.1(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedstream-compare@2.0.0(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedto-readable-stream@2.1.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedtype-fest@0.10.0(transitive)
+ Addeduniversalify@0.1.2(transitive)
- Removedhandlebars@^4.0.10
- Removedhighlight.js@^9.12.0
- Removedarr-diff@2.0.0(transitive)
- Removedarray-unique@0.2.1(transitive)
- Removedbootprint-base@2.0.0-rc.5(transitive)
- Removedbraces@1.8.5(transitive)
- Removedcheerio@1.0.0(transitive)
- Removedcheerio-select@2.1.0(transitive)
- Removedcss-select@5.1.0(transitive)
- Removedcss-what@6.1.0(transitive)
- Removeddom-serializer@2.0.0(transitive)
- Removeddomelementtype@2.3.0(transitive)
- Removeddomhandler@5.0.3(transitive)
- Removeddomutils@3.1.0(transitive)
- Removedencoding-sniffer@0.2.0(transitive)
- Removedentities@4.5.0(transitive)
- Removedexpand-brackets@0.1.5(transitive)
- Removedexpand-range@1.8.2(transitive)
- Removedextglob@0.3.2(transitive)
- Removedfilename-regex@2.0.1(transitive)
- Removedfill-range@2.2.4(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedglob-base@0.3.0(transitive)
- Removedhtmlparser2@9.1.0(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-dotfile@1.0.3(transitive)
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-number@2.1.04.0.0(transitive)
- Removedis-posix-bracket@0.1.1(transitive)
- Removedis-primitive@2.0.0(transitive)
- Removedmarked@0.3.19(transitive)
- Removedmath-random@1.0.4(transitive)
- Removedmicromatch@2.3.11(transitive)
- Removednth-check@2.1.1(transitive)
- Removedobject.omit@2.0.1(transitive)
- Removedparse-glob@3.0.4(transitive)
- Removedparse5@7.1.2(transitive)
- Removedparse5-htmlparser2-tree-adapter@7.0.0(transitive)
- Removedparse5-parser-stream@7.1.2(transitive)
- Removedpreserve@0.2.0(transitive)
- Removedrandomatic@3.1.1(transitive)
- Removedregex-cache@0.4.4(transitive)
- Removedundici@6.19.8(transitive)
- Removedwhatwg-encoding@3.1.1(transitive)
- Removedwhatwg-mimetype@4.0.0(transitive)
Updatedbootprint-base@^4.0.0