Skip to content

Commit 9980bb5

Browse files
committed
Initial commit
0 parents  commit 9980bb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+76983
-0
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
example/build/
3+
node_modules/
4+
.snapshots/
5+
*.min.js

.eslintrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": [
4+
"standard",
5+
"standard-react",
6+
"plugin:prettier/recommended",
7+
"prettier/standard",
8+
"prettier/react"
9+
],
10+
"env": {
11+
"node": true
12+
},
13+
"parserOptions": {
14+
"ecmaVersion": 2020,
15+
"ecmaFeatures": {
16+
"legacyDecorators": true,
17+
"jsx": true
18+
}
19+
},
20+
"settings": {
21+
"react": {
22+
"version": "16"
23+
}
24+
},
25+
"rules": {
26+
"space-before-function-paren": 0,
27+
"react/prop-types": 0,
28+
"react/jsx-handler-names": 0,
29+
"react/jsx-fragments": 0,
30+
"react/no-unused-prop-types": 0,
31+
"import/export": 0
32+
}
33+
}

.flowconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Default flow options are good for most use cases, so this is left blank.
2+
[ignore]
3+
.*/example/.*
4+
5+
[include]
6+
7+
[libs]
8+
# Add things here that have their own flow types (e.g. redux-persist)
9+
10+
[lints]
11+
12+
[options]
13+
module.file_ext=.js
14+
15+
16+
[strict]
17+
18+
[untyped]
19+
.*/node_modules/react-select/.*
20+
.*/node_modules/react-jss/.*
21+
.*/node_modules/react-beautiful-dnd/.*
22+
.*/node_modules/@ginkgo-bioworks/react-json-schema-form-builder/.*
23+
24+
[version]
25+
0.92.1
26+

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
5+
node_modules
6+
7+
# testing
8+
coverage
9+
10+
# builds
11+
dist
12+
example/build
13+
14+
.DS-store
15+
16+
npm-debug.log*

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"singleQuote": true,
3+
"jsxSingleQuote": true,
4+
"semi": true,
5+
"tabWidth": 2,
6+
"bracketSpacing": true,
7+
"jsxBracketSameLine": false,
8+
"arrowParens": "always",
9+
"trailingComma": "all"
10+
}

.readthedocs.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
3+
mkdocs:
4+
configuration: mkdocs.yml
5+
6+
formats: all
7+
8+
python:
9+
version: 3.7
10+
install:
11+
- requirements: .requirements.docs.txt

.requirements.docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mkdocs==1.1.2

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
language: node_js
2+
node_js:
3+
- node
4+
after_success:
5+
- coveralls < coverage/lcov.info
6+
- test $TRAVIS_BRANCH = "main" && npm run-s build && cd example && npm install &&
7+
npm run build && cd ..
8+
deploy:
9+
- provider: pages
10+
local_dir: example/build
11+
skip_cleanup: true
12+
github_token: "$GITHUB_TOKEN"
13+
keep_history: true
14+
on:
15+
branch: main
16+
- provider: npm
17+
18+
api_key: "$NPM_TOKEN"
19+
on:
20+
tags: true
21+
repo: ginkgobioworks/react-json-schema-form-builder
22+
env:
23+
global:
24+
- secure: Flqu795ioTwg6u3/v/Gf7quuH/d3OVCLj0IYnr7U9beYWqsILKfe1mh/gQ6yjku5Gx32+sroXdo7t1/qr1ZIdw+eWqDS7DIQtNTlXO5l6U1FpvtvSe7WQdHqalcIPrPYffLhv/w/+qZV1yC6tiZRAbujknn046MVIcWshrz3A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rXQAxWSj8BDS+LqRuAbwjpnWnZ/Nfuap9DyjSlC5KCnYyb/xQgM2Y+MMT8G3RbxUYL3bB3Upy5HR7deWD8YbH75VyouPZlSpruhn4Qwd5flxgLAfG0svj6GpBZ8J0lQ7zXYLTv+NU=

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## [1.0.0] - 2020-12-11
4+
5+
### Added
6+
7+
- form builder source code
8+
- form builder example app
9+
- tests
10+
- travis-ci integration
11+
- documentation

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
Anyone should feel free to make a pull request and contribute to the Form Builder codebase. This document gives an overview of the repository structure, how the test harness works, rules for contributing, and information about the CI/CD pipeline in place to publish changes to NPM.
4+
5+
## Opening Issues and Pull Requests
6+
7+
To open an issue, go to the [GitHub repo](https://github.com/ginkgobioworks/react-json-schema-form-builder) and go to the *Issues* tab. There, click the **New Issue** button and post the feature or bug to be worked on. We ask that, for bug fixes, you enter in the title "[Bug] <Brief description goes here...>", and for features, you title the issues "[Title] <Brief description goes here...>". If an issue falls under neither category, do not add the "[bracket]" tag, and they'll be handled as miscellaneous issues.
8+
9+
For pull requests, go the the *Pull Request* tab on the same repo. Select the branch that you created after clicking *New Pull Request* and provide a title and description for the request. You will want to merge to the main branch, as once a merge is successful, a pipeline will be kicked off the update the documentation, demo app, and publish to npm if all of the tests pass. The status of your PR in tests will also be available when you go through this process. Approval must be given from one of the administrators for a PR to be accepted.
10+
11+
## Repository Structure
12+
13+
In this repository, the source code for the component library is in the `src` directory. Building the repository creates a new folder `dist`, hidden through `.gitignore`, that compiles out the [Flow type annotations](https://flow.org/en/docs/types/) and [JSX](https://reactjs.org/docs/introducing-jsx.html). This is necessary to publish the code onto NPM so that other developers can use the code in their own apps, agnostic to their developer environments.
14+
15+
The example app being run on the [GitHub Pages site](https://ginkgobioworks.github.io/react-json-schema-form-builder/), meanwhile, has its code stored in the `example` directory. It relies on an additional set of dependencies, which are stored in the `devDependencies` within the `package.json` file.
16+
17+
## Testing
18+
19+
The `src` directory also contains testing files written for the [jest](https://jestjs.io/en/) test harness. The tests use [Enzyme](https://github.com/enzymejs/enzyme) for component and DOM manipulation and traversal. These tests are run in the CI/CD pipeline, and must pass before a branch can be merged into the 'main' branch. Changes may be needed to the test harness to accommodate new features or fixes.
20+
21+
Test coverage is [tracked in coveralls.io](https://coveralls.io/github/ginkgobioworks/react-json-schema-form-builder) to make sure that test coverage is maintained or increased as time goes on.
22+
23+
## Documentation
24+
25+
Documentation is stored in the `docs` directory, and it is used to generate documentation on https://react-json-schema-form-builder.readthedocs.io/. Builds for the [Read the Docs](https://readthedocs.org/) site are triggered with every push to the `main` branch, which submits a job to the Read the Docs server. This job reads the `.readthedocs.yml` file for configuratoin, which points to the `mkdocs.yml` file for more instructions on how to serve the markdown files.
26+
27+
## Demo
28+
29+
GitHub Pages runs off the `gh-pages` branch, which can only be pushed to by the Travis CI bot. After passing all of the tests on `main`, the CI pipeline will automatically push the files in `example/build` onto the `gh-pages` branch, which will update the demo available on the static GitHub Pages site https://ginkgobioworks.github.io/react-json-schema-form-builder/
30+
31+
## Release
32+
33+
The maintainers will release new versions to NPM as appropriate. The procedure that the maintainers will use to release is to update the changelog with the newest version, update the package.json version, and tag the main branch with the version number, upon which the travis-CI will run tests again before deploying to NPM automatically.

0 commit comments

Comments
 (0)