Socket
Socket
Sign inDemoInstall

bootprint-json-schema

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootprint-json-schema - npm Package Compare versions

Comparing version 2.0.0-rc.3 to 4.0.0

handlebars/helpers.js

28

CHANGELOG.md

@@ -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 @@

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc