Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Initial React rewrite #357

Merged
merged 243 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
4c3b4aa
Initial React rewrite
RomanHotsiy Oct 11, 2017
d1dbd43
chore: update react-dropdown to fix perf issue
RomanHotsiy Oct 12, 2017
595d5e0
chore: update deps
RomanHotsiy Nov 8, 2017
162ad11
Default response should be error if there is sucessfull response
RomanHotsiy Nov 14, 2017
0061a87
Fix some tests
RomanHotsiy Nov 14, 2017
109d135
Make ReDoc render sync + separate standalone componenet
RomanHotsiy Nov 14, 2017
9bc44fd
fix bundle hanging
RomanHotsiy Nov 14, 2017
7139586
Add stats npm task
RomanHotsiy Nov 14, 2017
8e6b9e8
Add OpenAPI 2.0 compatibility mode
RomanHotsiy Nov 14, 2017
bf255a4
Add todo to Endpoint component
RomanHotsiy Nov 14, 2017
1c5730c
Update deps
RomanHotsiy Nov 15, 2017
bc1e06f
Remove crypto hack after swagger2openapi update
RomanHotsiy Nov 15, 2017
b79de20
Add --profile to stats task
RomanHotsiy Nov 15, 2017
d896ebc
Clean up
RomanHotsiy Nov 15, 2017
6dae49a
Standalone ReDoc bundle + v1.x basic compatibility
RomanHotsiy Nov 19, 2017
ec45c85
umd bundle
RomanHotsiy Nov 19, 2017
7c72949
Move playground + fix perf benchmark
RomanHotsiy Nov 19, 2017
77f2a8b
clean up .travis.yml + README.md
RomanHotsiy Nov 19, 2017
08034dc
webpack config in typescript
RomanHotsiy Nov 19, 2017
f7374ca
fix webpack config ts issues
RomanHotsiy Nov 19, 2017
bab7ce9
Fix bundles
RomanHotsiy Nov 19, 2017
418f5cd
Fix e2e tests
RomanHotsiy Nov 19, 2017
adfc5e5
update deps
RomanHotsiy Nov 19, 2017
64471c6
Do not minify bundle.lib
RomanHotsiy Nov 19, 2017
f0f1e48
include style-loader
RomanHotsiy Nov 19, 2017
092d488
Fix setState run before mount
RomanHotsiy Nov 19, 2017
3e3a574
sticky sidebar
RomanHotsiy Nov 20, 2017
c17178f
Remove compiled test
RomanHotsiy Nov 20, 2017
6d7fd54
Fix sticky on Edge + IE11
RomanHotsiy Nov 20, 2017
141b9f6
Add polyfills for IE11
RomanHotsiy Nov 20, 2017
f65dd95
fix tsconfig includes
RomanHotsiy Nov 20, 2017
5438770
Filter readOnly and writeOnly fields from request/response
RomanHotsiy Nov 20, 2017
1dabeeb
Do not reload page extra times in e2e tests
RomanHotsiy Nov 20, 2017
6fbd47b
Update Redoc Standalone API
RomanHotsiy Nov 20, 2017
c2f82cd
Implement options and scrollYOffset option
RomanHotsiy Nov 20, 2017
8d84fa6
Add validations to RedocStandalone component
RomanHotsiy Nov 20, 2017
95f82b5
Fix sticky polyfill after moving it to StickySidebar component
RomanHotsiy Nov 20, 2017
e857182
Implement hideHostname option
RomanHotsiy Nov 20, 2017
f52a05a
Implement expandResponses option
RomanHotsiy Nov 21, 2017
a28e24e
Implement requiredPropsFirst opttion
RomanHotsiy Nov 21, 2017
f607b98
Implement noAutoAuth option
RomanHotsiy Nov 21, 2017
f58ef3f
fix crash for responses without content but with headers
RomanHotsiy Nov 21, 2017
5b3964e
minor update in hmr playground
RomanHotsiy Nov 21, 2017
0ab1c71
Fix crash when content is empty map
RomanHotsiy Nov 21, 2017
028e953
Implement nativeScrollbars option
RomanHotsiy Nov 21, 2017
678cd9e
Implement pathInMiddlePanel option
RomanHotsiy Nov 22, 2017
57c424f
Implement hideLoading + refactor Loading component
RomanHotsiy Nov 22, 2017
63dfdeb
Add version and revision to standalone bundle exports
RomanHotsiy Nov 22, 2017
37b6dff
Enhance ErrorBoundary component with stacktrace + version info
RomanHotsiy Nov 22, 2017
ce1f014
Add http-server npm task
RomanHotsiy Nov 22, 2017
07eef93
Implement sanitization (aka untrustedSpec option)
RomanHotsiy Nov 22, 2017
0bd8c66
Update jest snapshots
RomanHotsiy Nov 22, 2017
ed13bb0
Merge theme deeply
RomanHotsiy Nov 22, 2017
cec37df
Security Definitions component
RomanHotsiy Nov 22, 2017
52e7bfb
remove extra console.log-s
RomanHotsiy Nov 22, 2017
0faa66b
Minor fixes before alpha
RomanHotsiy Nov 23, 2017
14566b3
Center logo
RomanHotsiy Nov 23, 2017
359e57d
Menu items styling update
RomanHotsiy Nov 23, 2017
a1604c6
📝 Update readme
RomanHotsiy Nov 23, 2017
2380da3
Update Changelog
RomanHotsiy Nov 23, 2017
831c23d
Move react and react-dom to peerDependencies
RomanHotsiy Nov 23, 2017
11387ed
🔖 Release v2.0.0-alpha.1
RomanHotsiy Nov 23, 2017
86a7405
Make conversion process more robust
RomanHotsiy Nov 23, 2017
b037318
Update dependencies
RomanHotsiy Nov 23, 2017
9f8aee2
🔖 Release v2.0.0-alpha.2
RomanHotsiy Nov 23, 2017
c1fe2e6
downgrade cypress
RomanHotsiy Nov 23, 2017
1994002
Fix nested allOfs
RomanHotsiy Nov 23, 2017
343f51a
Fix security schemes representation
RomanHotsiy Nov 23, 2017
bdf6079
fix: crash when $ref is url encoded
RomanHotsiy Nov 23, 2017
334a0a0
fix: make oneOf not skip fields defined alongside
RomanHotsiy Nov 23, 2017
3d4ccaa
chore: setup auto changelog generation
RomanHotsiy Nov 23, 2017
ce543cf
v2.0.0-alpha.3
RomanHotsiy Nov 23, 2017
335deb9
fix: crashes on some dereferencing/allOf merging cases
RomanHotsiy Nov 24, 2017
3421be2
fix: add ellipsis for menu items with long words
RomanHotsiy Nov 24, 2017
ca81b6d
fix: don't display operations without tags as tag items in menu
RomanHotsiy Nov 24, 2017
426e5b6
fix: do not auto-append security-definitions if they are not in the spec
RomanHotsiy Nov 24, 2017
c484411
refactor: rename SecurityDefs to SecuritySchemes
RomanHotsiy Nov 24, 2017
f1377da
chore: update jest snapshots
RomanHotsiy Nov 24, 2017
03ee4d1
🔖 v2.0.0-alpha.4
RomanHotsiy Nov 24, 2017
ff20838
chore: update deps
RomanHotsiy Dec 7, 2017
57129d3
bundle in reftools in lib build
RomanHotsiy Dec 7, 2017
4ae1574
fix: correct pointer for the schema
RomanHotsiy Dec 7, 2017
d27ba74
🔖 Release v2.0.0-alpha.5
RomanHotsiy Dec 7, 2017
14f8408
fix: do not ignore path level parameters
RomanHotsiy Dec 7, 2017
435cccd
fix: allOf and deref exit not only named refs
RomanHotsiy Dec 7, 2017
17da7b7
fix: improve rendering of types
RomanHotsiy Dec 7, 2017
87a88c5
chore: update snapshots
RomanHotsiy Dec 7, 2017
9be4071
chore: update deps
RomanHotsiy Dec 15, 2017
50e2a58
feat: initial display security requirements
RomanHotsiy Dec 15, 2017
d67852f
do not crashe when used in node (isomorphic)
RomanHotsiy Jan 9, 2018
bfee3ed
fix: owerwrite text-align to left
RomanHotsiy Jan 9, 2018
9d0f2a9
move required label to the left column
RomanHotsiy Jan 10, 2018
0b0bc99
fix: move title propagation to the correct place
RomanHotsiy Jan 10, 2018
480c4a8
update snapshots
RomanHotsiy Jan 10, 2018
7eb477b
Release v2.0.0-alpha.6
RomanHotsiy Jan 10, 2018
1743453
fix: add id attr to headers to work before react is loaded if ssr
RomanHotsiy Jan 10, 2018
9756364
fix: example value is not showed if it is false
RomanHotsiy Jan 10, 2018
33678e6
fix: crate spec as data/base64 link when ssr
RomanHotsiy Jan 10, 2018
b7f0a1a
Release v2.0.0-alpha.7
RomanHotsiy Jan 10, 2018
0253c5d
fix: undo section id + some minor fixes
RomanHotsiy Jan 10, 2018
39d1ac5
Release v2.0.0-alpha.8
RomanHotsiy Jan 10, 2018
34a8fe4
fix: handle scrollYOffset in ScrollService
RomanHotsiy Jan 11, 2018
392ac71
Release v2.0.0-alpha.9
RomanHotsiy Jan 11, 2018
1fb6967
fix: first menu item keeps always selected
RomanHotsiy Jan 16, 2018
94789e3
fix: definition name
RomanHotsiy Jan 16, 2018
2d20d06
fix: readonly/writeonly not respected in nested schemas
RomanHotsiy Jan 16, 2018
28d1cca
chore: update snapshots
RomanHotsiy Jan 16, 2018
8df469f
Release v2.0.0-alpha.10
RomanHotsiy Jan 16, 2018
96fb7ce
fix: courier misspelling (#409)
joshprice Jan 21, 2018
12f79f0
fix: use array items example
RomanHotsiy Jan 21, 2018
3819ad7
chore: update snapshots
RomanHotsiy Jan 21, 2018
dc18743
chore: add tslint + fix lint issues
RomanHotsiy Jan 22, 2018
f6a36d8
chore: update deps
RomanHotsiy Jan 22, 2018
2bae43f
chore: add CONTRIBUTING.md 👥
RomanHotsiy Jan 23, 2018
199f240
fix: perfect scroll not working
RomanHotsiy Jan 23, 2018
5bb0bdf
feat: port "copy to clipboard" / "expand/collapse all" functionality
RomanHotsiy Jan 23, 2018
ef4e6d8
tests: add SSR test
RomanHotsiy Jan 23, 2018
6c71a66
fix: wrap text in code samples
RomanHotsiy Jan 24, 2018
4b5df22
fix: make active tab more clear
RomanHotsiy Jan 24, 2018
e9f23f7
fix: crash on 2-level md heading at the beginning
RomanHotsiy Jan 29, 2018
a35541f
chore: improve basic benchmark
RomanHotsiy Jan 29, 2018
fab4fee
tests: add tests for md renderer
RomanHotsiy Jan 29, 2018
d8d1cc1
chore: update deps
RomanHotsiy Jan 29, 2018
4037e84
chore: update benchmark to latest puppeteer
RomanHotsiy Jan 29, 2018
a66de6c
Release 2.0.0-alpha.11 🔖
RomanHotsiy Jan 29, 2018
a29c3cc
fix: basic responsiveness
RomanHotsiy Jan 30, 2018
3aab2d9
feat: responsive side menu
RomanHotsiy Jan 30, 2018
a6ae43a
tests: filter out options object from snapshorts
RomanHotsiy Jan 30, 2018
a7e9254
tests: rewrite test to not use useless snapshot
RomanHotsiy Jan 30, 2018
a3cbb14
fix: fix tbody > tr nesting warning
RomanHotsiy Feb 5, 2018
29207cf
fix: improve copy tooltip perf
RomanHotsiy Feb 7, 2018
84d1c7b
fix: resolve menu synchronization issue (use proper throttle)
RomanHotsiy Feb 7, 2018
32cd670
chore: refactor MarkdownRenderer.extractHeadings
RomanHotsiy Feb 7, 2018
f31a031
chore: fix lint errors and test
RomanHotsiy Feb 7, 2018
7ed5bc1
chore: update deps
RomanHotsiy Feb 7, 2018
b95f665
chore: make TS happy
RomanHotsiy Feb 7, 2018
dead161
fix: crash in MarkdownRenderer on non-string
RomanHotsiy Feb 7, 2018
ee822f6
fix: filter out non-existing security schemas + warn
RomanHotsiy Feb 7, 2018
ff3bb24
fix: discriminator fix
RomanHotsiy Feb 7, 2018
1f3701d
fix: fix oneOf title for array
RomanHotsiy Feb 7, 2018
73b2126
Release 2.0.0-alpha.12 🔖
RomanHotsiy Feb 7, 2018
1f7fc44
fix: fix crash when referencing non-existing security scheme
RomanHotsiy Feb 8, 2018
71e189f
chore: refactor ObjectSchema and Field, less rerenders on expand
RomanHotsiy Feb 8, 2018
6990cd2
feat: basis search
RomanHotsiy Feb 8, 2018
213f85b
refactor: switch to marked (🗜 -81kB to minified bundle size)
RomanHotsiy Feb 9, 2018
e1b2065
refactor: switch to simple Tooltip (🗜 yet another 83kB to bundle size)
RomanHotsiy Feb 9, 2018
13165fb
fix: referenced header name is empty
RomanHotsiy Feb 12, 2018
b33b954
chore: add a few more integration tests
RomanHotsiy Feb 17, 2018
fe989e2
chore: use node@8 on travis
RomanHotsiy Feb 18, 2018
f30a92b
chore: fix lint issue
RomanHotsiy Feb 18, 2018
3924d3c
fix: fix the media queries utils so it gets the values from the curre…
CesarLanderos Feb 25, 2018
bcf39dc
fix: discriminator dropdown showing incorrect field if sorted
RomanHotsiy Mar 5, 2018
0f1b6a6
fix: one-of dropdown not switching
RomanHotsiy Mar 5, 2018
87abdf7
fix: writeOnly not respected in response samples
RomanHotsiy Mar 5, 2018
02c2413
fix: fix overflowing content in JSON samples
RomanHotsiy Mar 5, 2018
2462639
fix: skipReadOnly/skipWritOnly not passing down to nested OneOf
RomanHotsiy Mar 5, 2018
8926dd4
fix: merge inner properties of allOf
RomanHotsiy Mar 5, 2018
6df8127
fix: skipReadOnly/skipWritOnly not passing down to nested array
RomanHotsiy Mar 5, 2018
8bd71de
chore: update deps
RomanHotsiy Mar 5, 2018
ecf33d2
feat: reqired-first sort order for params
RomanHotsiy Feb 19, 2018
1ff2bd8
feat: add marker
RomanHotsiy Feb 22, 2018
b797c96
fix: various search fixes
RomanHotsiy Feb 22, 2018
825162e
feat: add clear icon to searchbox
RomanHotsiy Feb 22, 2018
67e459f
chore: do not prioritize tag elements over operations
RomanHotsiy Mar 5, 2018
61bb79e
chore: fix lint issues
RomanHotsiy Mar 5, 2018
8e4184b
chore: update types for mark.js
RomanHotsiy Mar 6, 2018
e94f842
feat: serialize search-index
RomanHotsiy Mar 6, 2018
1428fb5
fix: fix search-indexing for SSR
RomanHotsiy Mar 6, 2018
29b0846
chore: add dead-simple example of SSR
RomanHotsiy Mar 6, 2018
4896346
fix: fix worker import
RomanHotsiy Mar 6, 2018
a78f9ab
fix: fix right-panel blinking when scrolling + css improvements
RomanHotsiy Mar 7, 2018
8757fa5
fix: add extra null-check + warning
RomanHotsiy Mar 7, 2018
0658b8e
chore: export hydrate from standalone build
RomanHotsiy Mar 7, 2018
8dbe938
feat: add hideDownloadButton option
RomanHotsiy Mar 7, 2018
49c23c9
chore: ts-ignore import issue + fix lint errors
RomanHotsiy Mar 7, 2018
18ec3ac
fix: align logo by center
RomanHotsiy Mar 9, 2018
0cb0af2
fix: make ReactStandalone react on props changes
RomanHotsiy Mar 9, 2018
28f2391
fix: add logo width to the theme
RomanHotsiy Mar 9, 2018
83eaa5f
chore: create demo page
RomanHotsiy Mar 13, 2018
21447d2
chore: fix lint issues
RomanHotsiy Mar 13, 2018
390f6c1
feat: ReDoc CLI ✨
RomanHotsiy Mar 13, 2018
5dc21af
fix: A couple minor bug fixes (#436)
MrBlenny Mar 14, 2018
e5458c0
chore: various CLI fixes
RomanHotsiy Mar 14, 2018
fe3245a
feat: arrow navigation in search results
RomanHotsiy Mar 14, 2018
3bbd358
docs: CLI basic docs
RomanHotsiy Mar 15, 2018
703664e
chore: Release 2.0.0-alpha.13 🔖
RomanHotsiy Mar 15, 2018
e8609d2
tests: temporary disable test failing only in Cypress headless
RomanHotsiy Mar 15, 2018
7769ba8
fix: fix CLI crash + build it on travis
RomanHotsiy Mar 15, 2018
bb67c6c
chore: Release 2.0.0-alpha.14 🔖
RomanHotsiy Mar 15, 2018
ea3c731
chore: use latest RC of typescript
RomanHotsiy Mar 16, 2018
1df690a
feat: more advanced theme engine
RomanHotsiy Mar 16, 2018
6018042
fix: fix broken css after installing polished
RomanHotsiy Mar 16, 2018
d365516
chore: fix lint issues
RomanHotsiy Mar 16, 2018
428f020
chore: Release 2.0.0-alpha.15 🔖
RomanHotsiy Mar 16, 2018
053248e
chore: update to the latest react-hot-loader@4
RomanHotsiy Mar 17, 2018
598b339
chore: do not apply hot-reloading plugin in prod mode
RomanHotsiy Mar 17, 2018
e27d421
chore: migrate to ts-loader
RomanHotsiy Mar 17, 2018
6c70d1a
chore: migrate to webpack 4
RomanHotsiy Mar 17, 2018
e002f2a
chore: update all deps to latest
RomanHotsiy Mar 17, 2018
40a4837
chore: disable broken e2e test
RomanHotsiy Mar 17, 2018
b0dd7d5
chore: add bundlesize test + update readme
RomanHotsiy Mar 17, 2018
2c320d2
chore: setup coverage + coveralls
RomanHotsiy Mar 17, 2018
ebb9b7e
chore: setup cypress record
RomanHotsiy Mar 17, 2018
e022349
feat: use new Context API for options
RomanHotsiy Mar 17, 2018
fa4578d
chore: enable coverage for npm test by default
RomanHotsiy Mar 17, 2018
9026795
tests: add MarkerService tests
RomanHotsiy Mar 17, 2018
020f8fd
chore: yarn cache on travis
RomanHotsiy Mar 17, 2018
5084780
chore: autotag releases on npm
RomanHotsiy Mar 18, 2018
ed20ac1
fix: prefer extend of styled to make styles more predictable
RomanHotsiy Mar 18, 2018
95c7585
fix: move cli to a separate npm package
RomanHotsiy Mar 18, 2018
7731f93
chore: try deploying cli from travis
RomanHotsiy Mar 18, 2018
cb39a4b
chore: try deploying cli from Travis
RomanHotsiy Mar 18, 2018
8f62bf2
chore: allow deployment from branch
RomanHotsiy Mar 18, 2018
4924f2f
chore: try npm publish with --registry
RomanHotsiy Mar 18, 2018
b3fca14
chore: use ci-publish to publish CLI
RomanHotsiy Mar 18, 2018
8780f2d
chore: fix ci-publish from travis
RomanHotsiy Mar 18, 2018
096cbeb
chore: do not fail build on cli publish
RomanHotsiy Mar 18, 2018
20730c8
chore: Release 2.0.0-alpha.16 🔖
RomanHotsiy Mar 18, 2018
4510311
chore: add missing package to CLI
RomanHotsiy Mar 18, 2018
f993e9b
chore: fix redoc standalone path in CLI
RomanHotsiy Mar 18, 2018
03cc781
chore: update redoc-cli docs
RomanHotsiy Mar 18, 2018
5b136c1
tests: prefer attributes over classes in e2e tests
RomanHotsiy Mar 19, 2018
0fa72a5
tests: add more search tests
RomanHotsiy Mar 19, 2018
440e15e
chore: switch to cy webpack-preprocessor instead of fork
RomanHotsiy Mar 19, 2018
39752fb
tests: enable breaking test to record it
RomanHotsiy Mar 19, 2018
fee7aec
tests: record videos and failure screenshots
RomanHotsiy Mar 19, 2018
d3779bf
tests: remove failing check
RomanHotsiy Mar 19, 2018
bb8a678
feat(cli): add title option to bundle
RomanHotsiy Mar 20, 2018
b7afce9
feat(cli): add --template option
RomanHotsiy Mar 20, 2018
05403a7
fix: css fix + update theme
RomanHotsiy Mar 20, 2018
7ee1ab2
chore: add handlebars typings
RomanHotsiy Mar 20, 2018
2732c89
feat(cli): add options to specify redoc options
RomanHotsiy Mar 20, 2018
3f6e221
docs: add CLI examples
RomanHotsiy Mar 20, 2018
8ce355d
chore: bump cli version
RomanHotsiy Mar 20, 2018
5f1e553
chore: fix lint issues
RomanHotsiy Mar 20, 2018
06b5a00
fix(cli): rename redoc-cli bin
RomanHotsiy Mar 20, 2018
8891f5c
fix(cli): fix crash
RomanHotsiy Mar 20, 2018
c729c6c
fix(cli): fix output option type
RomanHotsiy Mar 20, 2018
b116796
chore(cli): CLI release 0.3.4
RomanHotsiy Mar 20, 2018
c9c6bc5
fix(cli): allow to set url to the spec in SSR mode
RomanHotsiy Mar 20, 2018
0703c7f
chore(cli): CLI release 0.3.5
RomanHotsiy Mar 20, 2018
cbce28a
feat: add more options to theme
RomanHotsiy Mar 20, 2018
d27e61a
fix: make field type color more dark (closes #439)
RomanHotsiy Mar 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 9 additions & 29 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=false
indent_style=space
indent_size=2

[{.eslintrc,.babelrc,.stylelintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}]
indent_style=space
indent_size=2

[*.scss]
indent_style=space
indent_size=2

[*.styl]
indent_style=space
indent_size=2
root = true

[*.coffee]
indent_style=space
indent_size=2

[{.analysis_options,*.yml,*.yaml}]
indent_style=space
indent_size=2

[tslint.json]
indent_style=space
indent_size=2
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
94 changes: 94 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# ReDoc Contributing Guide

Hi! We're really excited that you are interested in contributing to ReDoc. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.

- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)

## Issue Reporting Guidelines
- Before filing a new issue, try to make sure your problem doesn’t already exist.
- The best way to get your bug fixed is to provide a reduced test case.

## Pull Request Guidelines
Before submitting a pull request, please make sure the following is done:

1. Fork the repository and create your branch from master.
2. Run `yarn` in the repository root.
3. If you’ve fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
5. Format your code with prettier (`yarn prettier`).

## Development Setup

You will need [Node.js](http://nodejs.org) at `v8.0.0+` and [Yarn](https://yarnpkg.com/en/) at `v1.2.0+`

After cloning the repo, run:

```bash
$ yarn install # or yarn
```

### Commonly used NPM scripts

``` bash
# dev-server, watch and auto reload playground
$ yarn start

# start playground app in production environement
$ yarn start:prod

# runt tslint
$ yarn lint

# try autofix tslint issues
$ yarn lint --fix

# run unit tests
$ yarn unit

# run e2e tests
$ yarn e2e

# open cypress UI to debug e2e test
$ yarn cy:open

# run the full test suite, include linting / unit / e2e
$ yarn test

# prepare bundles
$ yarn bundle

# format the code using prettier
$ yarn prettier

# auto-generate changelog
$ yarn changelog
```

There are some other scripts available in the `scripts` section of the `package.json` file.

## Project Structure

- **`benchmark`**: contains basic perf benchmark. Not fully ready yet

- **`demo`**: contains project demo with demo specs and HMR playground used in development

- `demo/playground`: HMR Playground used in development

- **`docs`**: contains extra docs (linked from README.md)

- **`e2e`**: contains e2e tests. The e2e tests are written and run with [Cypress](https://www.cypress.io/).


- **`src`**: contains the source code. The codebase is written in Typescript. CSS styles are managed with [Styled components](https://www.styled-components.com/). State is managed by [MobX](https://github.com/mobxjs/mobx)

- **`src/common-elements`**: containts common Styled elements or components used in multiple places
- **`src/components`**: contains main visual components
- **`src/services`**: contains different services used by ReDoc including MobX stores
- **`src/services/models`**: contains classes for OpenAPI entities (e.g. Response, Operations, etc)
- **`src/types`**: contains extra typescript typings including OpenAPI doc typings
- **`src/utils`**: utility functions
- **`src/styled-components.ts`**: - reexprots styled-components with proper typescript annotations using theme
- **`src/theme.ts`**: - default theme (colors, fonts, etc) used by all the components
23 changes: 9 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,15 @@ npm-debug.log*
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules

# compiled css
lib/**/*.css

# files produced by ngc
lib/**/*.ngfactory.ts
lib/**/*.css.shim.ts
**/*.ngsummary.json
lib/**/*.shim.ngstyle.ts

# other
/dist
/demo/build
.tmp
compiled
lib/
stats.json
e2e/.build/
cypress/
bundles
cli/index.js

/benchmark/revisions

/coverage
.ghpages-tmp
stats.json
Expand Down
15 changes: 3 additions & 12 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
.DS_Store
**/.*
compiled

node_modules
jspm_packages

tests
lib
demo
build
coverage
!bundles/
!package.json
!README.md
59 changes: 21 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,34 @@
language: node_js
node_js:
- '6'
branches:
except:
- releases
matrix:
include:
- env: JOB=unit
- env: JOB=e2e-guru
fast_finish: true
allow_failures:
- env: JOB=e2e-guru
- '8'
cache: yarn
env:
global:
- GH_REF: github.com/Rebilly/ReDoc.git
- GIT_AUTHOR_EMAIL: redoc-bot@users.noreply.github.com
- GIT_AUTHOR_NAME: RedocBot
- SAUCE_USERNAME: redoc
- secure: OgYIXlyF3tvHVrMjqIMR7UPhNvMzNZRkKE++LsQPUT4aoUmHoeukjgE9tKCZac3Z+PcAlgHQ6dPUqjqij2d/emYBIrCx4ABvTOnxQYHbk+8GriwPvQjV33MCfKvRQAf3XPNcga02aOO/EEGejrtY/i5sz86XPZFXap4scxbvnF0rzOwGU9/A40JLsvKjtfdRxJ3aC2QBnUHP9JkfBOzbs3jjwEWYN7HdUBqtYU+wiUwvHhpEPQ8BVNF5ETp5OxxkTdqJlMRf3azC4U/Rl8dhUXZP2l1ZBdpgahDvSkx1zXPwKRg1jos88jahqH/v8DLHtXNuYQy4S48nKWZfaRtQegG/XsYAftYPtYage7L9D0nFQW9YZI0vwUBEzh2YTf+QNpVwUSyZhVuS1oS+scTb8RU8BVVZd6hRpJiaI2YiPM6ZFN7a69deV0cASov3yI7GSfeq4MmB4hu72Le+GhemQMLRxNgtr32c18XW1XoHEnpV7s0eKXnZrevnM06tW/nX9TQXGloaMUeQzoZY0AuF00zmrHDaNgwT63ULjY0W591Ey1Ztfq4ixd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/3DcozZyYsz7WQ6WI8tYabyjqqeJTF1N8a5T3IbZaZNV1J4JHOO9Cb/y7gIg4edANg6tbe7MzZpdEPRBnw6OkdTdirpNsWQ/jnfpY1hn6mraQZz/q8yaz3W21NjbBJhVnvfh5gWLKQ3YAAziCBhmmrThFhUu0czz+G920MuFo477TBcxvlrE7CaNJ0Q6yYkDehEPOv3jvEs1QVHPwuRrlaLTbBhrlTICKZ58gdX30O8N4i0Xgp/v6qrC03bplnMQc8E/uC61wcVLJixnlZVp8FODpUvPjsxVFkpuNSOIAaiqcERmoiPXx05Epzmr78hjU5rYCx/1MmVoeB4gs9YO+4guD4=
- secure: YWBKHe3EdY3DcASsMaW3/scxba11eMRjJ8HebyKyampU9JTkyj3rFY9sfYQshusYCVa3/pt2LyYITNLDI2vYGGFYVIu9ia9kMBjt4kZ99QQxvXTftmBruF2Gcw6aqja9e5SnQrDUY+Wnc3k33SqQhhNGiyF6M1HpV0S8JJZNc3oQjZHKkZ93IwA1mU/UWL/K3wE/y5xiKz8d+DjsLrhU94G6NE2mhs0eaJW/fMLLYxn+UfDuidGaRQ4v4a2aRPecalzyLqdRFgFH2YJpBPFF3XEC23J/hm1QChI75iINChWbTrNTJqWYKKljjB7WLNtqVrm3S5qpZwl322nwBhwhPVtT4PqattMribCA8XMSL9Lk/g1hRaxH7gXgGHAfpPaMhyPcKBzQ5HJxYI+UXoKPZqfyxkZbnVY/3s7P0pZ8Nql+UouvFURZkbWK3WLWCISCVVVdyhnB3wn+jKLWdsYCtu9ibvYDDCDT64T08b4Gf30j3BfaAlgO4uU30Bg/IulrFnOC99qhslQRODxY6HGizr6ggtS1C8TFZ2/+3CXuHZJ3LDdj9WoHyBgYtMtnQf+qBVy6z6nvyx/QsdnQ/8A1twObuZoFCLPpOPoKmAbjApC8XS0TgIyqf5KGcq33Jxg+bIakNAGJW33n4jtZW7+Z+p8SVGLQmRC/558Tn402a58=
addons:
sauce_connect: true
chrome: stable
cache: yarn
before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
before_deploy:
- if [[ ! -z "$TRAVIS_TAG" ]]; then npm run build:all; fi
before_script: npm run bundle && npm run compile:cli
script: npm test && npm run e2e-ci
after_script: cat ./coverage/lcov.info | coveralls
before_deploy: npm run compile:cli
deploy:
- provider: npm
skip_cleanup: true
email: gotsijroman@gmail.com
api_key:
secure: PuhWLERrCEFmXmdFpw2OVFlqpOIVDmgwk5JUJOYaFdVCh/smp0+jZCQ4vrdFpuG96rnDVirD+A8xvW6NgsNNaRthLgOB/LRdFN69rU6Gvn3At6wlnC55t5dlhxPvCfnzJcHVBLXX4EmMkjnZqDg2uczXTzPodr3FnQJNuXmP8B33fzDVLyHccvXZ90abwXWVrgRIXPU28niqCR8DOC2OTzs7wqz+BLNkYDRRbyYXsg62HWuD33x5iof5IqBmhzBt3usCGmF3QGcgHrXHdZw3sZnit8+Bua++3KrXR0x6HGXXN1AoXVmCAkCa5OTQ5R3tCRxiJN3P2KLnvWeZR74sTFkovJB/6pGCvbJ/c7Wnuw6sD7SgOUBD359ULB6lAf5OnxBLoNebX4JxxVXF+zA4E3Bl44VxkzDpPWc15xqBPMB5vBREzMVmJ5mExn2s5cmLQjADbl9h0y6gZnhnNJ+iTmqtrVyM0ZkF2rPrzrTdGD+ULmRIlTMkdD1bh+/TJ3RdXT3P4/zNUJmiNnvgnnJVYYvsGaXWF+7uCVHT/8k2RsoSHqgkqh0gkDqGSwVix55y5mC7T2Vk9lMBhm6MvFJXaonOX0kxJS4EDQ3plPd6/ybG+TLhwggYnQ8o9msU5Nt6FpUShKiezjKurIhbQZdwlVivX3tahjW2QjNDO58xGgY=
on:
tags: true
condition: $JOB != e2e-guru
- skip_cleanup: true
provider: script
script: npm run branch-release
on:
branch: master
condition: $JOB != e2e-guru
- skip_cleanup: true
provider: script
script: npm run deploy
on:
tags: true
condition: $JOB != e2e-guru
- provider: npm
skip_cleanup: true
email: gotsijroman@gmail.com
tag: next
api_key: $NPM_TOKEN
on:
tags: true
- provider: script
skip_cleanup: true
script: cd cli && yarn install && npm run ci-publish || true
on:
branch: react-rewrite
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading