Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonforms

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonforms

Generating forms for JSON schema

  • 1.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
237
decreased by-16.25%
Maintainers
5
Weekly downloads
 
Created
Source

JSONForms - More Forms. Less Code

JSONForms extends the AngularJS view model approach by eliminating the need to write HTML templates in order to create forms by leveraging the capabilities of JSON and JSON schema.

Usage

  1. Install JSON Forms via npm install jsonforms and require it via require('jsonforms')
  2. Annotate the element, where you want to place a form, with a jsf class attribute.
  3. Add jsonforms as a dependency to your AngularJS app:
var myApp = angular.module('myApp', ['jsonforms', ...])
  1. Load jsonforms.css in the head section:
<link rel="stylesheet" type="text/css" href="node_modules/jsonforms/dist/jsonforms.css">
  1. Render a form with the jsonforms element:

The simplest example looks like this, where schema, uiSchema and data are properties of a aliased controller named vm:

<div class="jsf">
  <jsonforms schema="vm.schema" uischema="vm.uiSchema" data="vm.data"></jsonforms>
</div>

Documentation and more information

For documentation, examples and more information, please see jsonforms.org.

Developers Documentation

First time setup

  • Install node.js(version > 4.x.x)
  • Clone this repository
  • Install dependencies: npm install
  • Generate typings: npm run typings-install

Build & Testing

  • Normal Build: npm run build (runs tslint as well)
  • Bootstrap Build: npm run build-bootstrap
  • Material Build: npm run build-material
  • Test: npm run test
  • Watch: npm run dev (or dev-bootstrap, dev-material), point your browser to http://localhost:8080/webpack-dev-server/

How to run the examples

JSONForms ships with a couple of examples. The examples' dependencies are managed via bower, hence you'll first need to run the following commands from the project root directory:

cd examples
bower install

Also make sure that you have followed the instructions for the first time setup in case you haven't done so already.

Now you start the example by running npm run dev and then pointing your browser to http://localhost:8080.

Note that for running the placeholder example you'll first need to start jsonplaceholder which provides a fake REST API. You can do so via

npm run start-placeholder

Continuous Integration

The JSONForms project is build and tested via Travis. Coverage is documented by Coveralls.

Current status: Build Status Coverage Status

Deployment

  • Locally login as one of the (npm) owners of the package (npm doc)
  • Make sure your workspace looks exactly the way you want to release it. (Files specified in .npmignore are normally ignored by npm, but this functionality is buggy. Therefore to be sure you should still remove all unwanted files before deploying.)
  • Run either npm run publish-patch,npm run publish-minor or npm run publish-major.

The script does the following:

  • Build all JSONForms alternatives
  • Execute tests
  • Increase version in package.json
  • Commit version bump to the current branch
  • Checkout a new temporary deploy-branch
  • Commit dist/jsonforms.js file
  • Create a new version tag
  • Push the version tag to 'upstream'
  • Release the workspace to npmjs

If any of the steps fail the script will abort. If the script was successful you should create a pull-request with the version bump commit to 'upstream'.

License

The JSONForms project is licensed under the MIT License. See the LICENSE file for more information.

Roadmap

Our current roadmap is available here.

FAQs

Package last updated on 22 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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