Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthropic committed Jan 24, 2017
2 parents 63c8783 + a473c1f commit e6c8ca7
Show file tree
Hide file tree
Showing 36 changed files with 3,399 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
[ "es2015" ]
],
"plugins": [ "transform-flow-strip-types" ]
}
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Only include sections relevant to your issue.
If you have not read docs/support.md and followed its guidance you may be ignored or closed without response.
Please use PREVIEW before you submit!!
-->
#### Enhancement
As a user/developer, when I ... I should be able to ...

#### Expected behaviour
I expected ...

#### Actual behaviour
It actually ...

#### Gist/Plunker/Demo
[Description](url)

#### Related issues
This is/maybe related to ...

@json-schema-form/angular-schema-form-lead
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#### Description

Add your description here

#### Fixes Related issues
- add related
- issues here

#### Checklist
- [ ] I have read and understand the CONTRIBUTIONS.md file
- [ ] I have searched for and linked related issues
- [ ] I have created test cases to ensure quick resolution of the PR is easier
- [ ] I am NOT targeting main branch
- [ ] I did NOT include the dist folder in my PR

@json-schema-form/angular-schema-form-lead
68 changes: 35 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
# /dist
/tmp

# dependencies
/node_modules
/bower_components

# IDEs and editors
/.idea
/.vscode
.editorconfig
.project
.classpath
*.launch
.settings/

# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

#System Files
.DS_Store
Thumbs.db
14 changes: 14 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"preset": "google",
"disallowSpacesInsideObjectBrackets": null,
"requireSpacesInsideObjectBrackets": {
"allExcept": [ "[", "]", "{", "}" ]
},
"disallowSpacesInsideArrayBrackets": null,
"requireSpacesInsideArrayBrackets": {
"allExcept": [ "[", "]", "{", "}" ]
},
"disallowKeywordsOnNewLine": [ ],
"disallowMultipleVarDecl": null,
"requireSemicolons": true
}
5 changes: 5 additions & 0 deletions .mocha
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--compilers js:babel-register
--require babel-polyfill
--reporter spec
--watch-extensions js
src/**/*.spec.js
7 changes: 7 additions & 0 deletions .mocha.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"reporterEnabled": "spec, markdown",
"markdownReporterOptions": {
"output": "test.md",
"mochaFile": "test.md"
}
}
6 changes: 6 additions & 0 deletions .mocha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--compilers js:babel-register
--require babel-polyfill
--recursive
--reporter markdown
--watch-extensions js
src/**/*.spec.js
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- node

sudo: false
62 changes: 60 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,60 @@
# json-schema-form
Core library
# JSON Schema Form Core
[![Gitter](https://img.shields.io/badge/GITTER-JOIN%20CHAT%20%E2%86%92-ff69b4.svg?style=flat-square)](https://gitter.im/json-schema-form/angular-schema-form?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/json-schema-form/json-schema-form-core.svg?branch=development)](https://travis-ci.org/json-schema-form/json-schema-form-core)

Core library for working with JSON-Schema with a UI-Schema (Form) definition that doesn't depend on a framework.

This library, through the use of its merge module, combines the schema and ui-schema
into a canonical schema for use by its services and external libraries.

You **DO NOT** use this file in addition to Angular Schema Form, it is embedded at
build into any frameworks using it.

## Work-In-Progress!
There is [test output](docs/test.md) that forms some super basic documentation
and I intend to expand them much further to the point of almost being
useful before I create a proper API and document that.

## Keeping Track
After changing to Webpack 2, this library now includes a detailed version
header which is passed through into `Angular Schema Form` and also the `Bootstrap` decorator bundle

```javascript
/*!
* json-schema-form-core
* @version 1.0.0-alpha.5
* @date Sat, 14 Jan 2017 08:08:15 GMT
* @link https://github.com/json-schema-form/json-schema-form-core
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
*/
```

## Contributing / Plans
The main contributions we need to the core at the moment are related to both the migration
of `Angular Schema Form` features to the core (like templates/builders) and the addition
of an API for use by ASF (Angular) and RSF (React) libraries.

Please contact @Anthropic via our [Gitter](https://gitter.im/json-schema-form/angular-schema-form) if you wish to get involved.

## Testing it

### With Angular Schema Form
There is a branch in angular-schema-form called `feature/webpack-babel` that integrates the core.
To use it roughly follow these steps:

* Clone angular-schema-form to a **sibling** directory and switch to branch `feature/webpack-babel`
* `npm install` to install dependencies
* `npm run build` to build with the core.
* Use dist/angular-schema-form.js, now with the core from this folder. *No need to also load ObjectPath since it is already included*

### With Mocha tests
Tests are written in mocha + chai and run trough `npm test`.

When the command `npm run testdoc` is run instead, the tests will also generate a readable
`markdown` file [test.md](docs/test.md) to document elements of the library.

## Notes
* ObjectPath is bundled with json-schema-form-core
* angular-schema-form bundles json-schema-form-core so the user doesn't have to include it as an dependency.
* The code for not using ObjectPath on Angular 1.2 is removed. Could maybe be fixed but I (davidlgj) strongly believe its time to drop Angular 1.2 support since it complicates validation code as well.
Loading

0 comments on commit e6c8ca7

Please sign in to comment.