Skip to content

Commit 7b1a46f

Browse files
authored
Merge pull request #33 from dubzzz/clean-badges
docs: reference the right repo in badges
2 parents 4005834 + 9ea9958 commit 7b1a46f

File tree

6 files changed

+51
-58
lines changed

6 files changed

+51
-58
lines changed

CONTRIBUTING.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Run the Dev Server
2+
3+
```bash
4+
# clone this repository
5+
git clone [email protected]:microlinkhq/react-json-view.git && cd react-json-view
6+
# install dependencies
7+
npm install --save-dev
8+
# run the dev server with hot reloading
9+
npm run dev
10+
```
11+
Webpack Dev Server should automatically open up http://localhost:2000 in your web browser. If it does not, open a browser and navigate to port 2000. The hot reloader will automatically reload when files are modified in the `/src/` directory.
12+
13+
## Run the Production Build
14+
15+
```bash
16+
# run the build (note: you may need to use `sudo` priveledges to run the build successfully)
17+
npm run build
18+
```
19+
Please add tests for your code before posting a pull request.
20+
21+
You can run the test suite with `npm run test` or `npm run test:watch` to automatically reload when files are modified.
22+
23+
## Docker Tools
24+
25+
I recommend using docker for development because it enforces environmental consistency.
26+
27+
For information about contributing with Docker, see the [README in ./docker](https://github.com/microlinkhq/react-json-view/blob/master/docker/README.md#contributing-to-this-project-using-docker).

README.md

+12-46
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
![alt text](https://github.com/mac-s-g/react-json-view/blob/master/doc/rjv-icon-alt.png?raw=true)
1+
![alt text](https://raw.githubusercontent.com/microlinkhq/react-json-view/master/doc/rjv-icon-alt.png)
22

3-
[![npm](https://img.shields.io/npm/v/react-json-view.svg)](https://www.npmjs.com/package/react-json-view) [![npm](https://img.shields.io/npm/l/react-json-view.svg)](https://github.com/mac-s-g/react-json-view/blob/master/LISCENSE) [![Build Status](https://travis-ci.org/mac-s-g/react-json-view.svg)](https://travis-ci.org/mac-s-g/react-json-view) [![Coverage Status](https://coveralls.io/repos/github/mac-s-g/react-json-view/badge.svg?branch=master)](https://coveralls.io/github/mac-s-g/react-json-view?branch=master)
3+
[![npm](https://img.shields.io/npm/v/%40microlink%2Freact-json-view.svg)](https://www.npmjs.com/package/@microlink/react-json-view) [![npm](https://img.shields.io/npm/l/%40microlink%2Freact-json-view.svg
4+
)](https://github.com/microlinkhq/react-json-view/blob/master/LICENSE) [![Build Status](https://github.com/microlinkhq/react-json-view/workflows/test/badge.svg)](https://github.com/microlinkhq/react-json-view/actions/workflows/main.yml?query=branch%3Amaster)
45

56
# react-json-view
67
RJV is a React component for displaying and editing javascript **arrays** and **JSON objects**.
78

89
This component provides a responsive interface for displaying arrays or JSON in a web browser. NPM offers a distribution of the source that's transpiled to ES5; so you can include this component with *any web-based javascript application*.
910

10-
[Check out the Interactive Demo](https://mac-s-g.github.io/react-json-view/demo/dist/)
11+
[Check out the Interactive Demo](https://react-json-view.microlink.io/)
1112

1213

1314
### Implementation Example
@@ -21,9 +22,9 @@ import ReactJson from '@microlink/react-json-view'
2122

2223
### Output Examples
2324
#### Default Theme
24-
![alt text](https://github.com/mac-s-g/react-json-view/blob/master/doc/output-example-15.png?raw=true "Output Example 1")
25+
![alt text](https://raw.githubusercontent.com/microlinkhq/react-json-view/master/doc/output-example-15.png "Output Example 1")
2526
#### Hopscotch Theme, with Triangle Icons:
26-
![alt text](https://github.com/mac-s-g/react-json-view/blob/master/doc/output-example-14.png?raw=true "Output Example 2")
27+
![alt text](https://raw.githubusercontent.com/microlinkhq/react-json-view/master/doc/output-example-14.png "Output Example 2")
2728

2829
### Installation Instructions
2930
Install this component with [NPM](https://www.npmjs.com/package/@microlink/react-json-view).
@@ -42,7 +43,7 @@ Name|Type|Default|Description
4243
|:---|:---|:---|:---
4344
`src`|`JSON Object`|None|This property contains your input JSON
4445
`name`|`string`|`JSX.Element` or `false`|"root"|Contains the name of your root node. Use `null` or `false` for no name.
45-
`theme`|`string`|"rjv-default"|RJV supports base-16 themes. Check out the list of supported themes [in the demo](https://mac-s-g.github.io/react-json-view/demo/dist/). A custom "rjv-default" theme applies by default.
46+
`theme`|`string`|"rjv-default"|RJV supports base-16 themes. Check out the list of supported themes [in the demo](https://react-json-view.microlink.io/). A custom "rjv-default" theme applies by default.
4647
`style`|`object`|`{}`|Style attributes for react-json-view container. Explicit style attributes will override attributes provided by a theme.
4748
`iconStyle`|`string`|"circle"| Style of expand/collapse icons. Accepted values are "circle", triangle" or "square".
4849
`indentWidth`|`integer`|4|Set the indent-width for nested objects
@@ -83,18 +84,18 @@ You can specify a `theme` name or object when you instantiate your rjv component
8384
```jsx
8485
<ReactJson src={my_important_json} theme="monokai" />
8586
```
86-
Check out the list of supported themes [in the component demo](https://mac-s-g.github.io/react-json-view/demo/dist/).
87+
Check out the list of supported themes [in the component demo](https://react-json-view.microlink.io/).
8788

8889
#### Monokai theme example
89-
![alt text](https://github.com/mac-s-g/react-json-view/blob/master/doc/output-example-monokai-2.png?raw=true "Base-16 Theme Example")
90+
![alt text](https://raw.githubusercontent.com/microlinkhq/react-json-view/master/doc/output-example-monokai-2.png "Base-16 Theme Example")
9091

9192
#### Solarized theme example
92-
![alt text](https://github.com/mac-s-g/react-json-view/blob/master/doc/output-example-solarized-2.png?raw=true "Base-16 Theme Example")
93+
![alt text](https://raw.githubusercontent.com/microlinkhq/react-json-view/master/doc/output-example-solarized-2.png "Base-16 Theme Example")
9394

9495
#### Use Your Own Theme
9596
You can supply your own base-16 theme object.
9697

97-
To better understand custom themes, take a look at [my example implementation](https://github.com/mac-s-g/react-json-view/blob/7c154b9a7d83ea89dce2c171ebdf4d163ff49233/dev-server/src/index.js#L135) and the [base-16 theme styling guidelines](https://github.com/chriskempson/base16/blob/master/styling.md).
98+
To better understand custom themes, take a look at [my example implementation](https://github.com/microlinkhq/react-json-view/blob/7c154b9a7d83ea89dce2c171ebdf4d163ff49233/dev-server/src/index.js#L135) and the [base-16 theme styling guidelines](https://github.com/chriskempson/base16/blob/master/styling.md).
9899

99100
### onEdit, onAdd and onDelete Interaction
100101
Pass callback methods to `onEdit`, `onAdd` and `onDelete` props. Your method will be invoked when a user attempts to update your `src` object.
@@ -110,39 +111,4 @@ The following object will be passed to your method:
110111
}
111112
```
112113

113-
Returning `false` from a callback method will prevent the src from being affected.
114-
115-
### Contributing to the source code
116-
#### Run the Dev Server
117-
118-
```bash
119-
# clone this repository
120-
git clone [email protected]:mac-s-g/react-json-view.git && cd react-json-view
121-
# install dependencies
122-
npm install --save-dev
123-
# run the dev server with hot reloading
124-
npm run dev
125-
```
126-
Webpack Dev Server should automatically open up http://localhost:2000 in your web browser. If it does not, open a browser and navigate to port 2000. The hot reloader will automatically reload when files are modified in the `/src/` directory.
127-
128-
#### Run the Production Build
129-
130-
```bash
131-
# run the build (note: you may need to use `sudo` priveledges to run the build successfully)
132-
npm run build
133-
```
134-
Please add tests for your code before posting a pull request.
135-
136-
You can run the test suite with `npm run test` or `npm run test:watch` to automatically reload when files are modified.
137-
138-
#### Docker Tools
139-
140-
I recommend using docker for development because it enforces environmental consistency.
141-
142-
For information about contributing with Docker, see the [README in ./docker](https://github.com/mac-s-g/react-json-view/blob/master/docker/README.md#contributing-to-this-project-using-docker).
143-
144-
145-
### Inspiration
146-
I drew a ton of design ideas from [react-json-tree](https://github.com/alexkuz/react-json-tree). Thanks to the RJT contributors for putting together an awesome component!
147-
148-
I'm also inspired by users who come up with interesting feature requests. Reach out to me with ideas for this project or other projects you want to collaborate on. My email address is listed on my [github user page](https://github.com/mac-s-g).
114+
Returning `false` from a callback method will prevent the src from being affected.

demo/dist/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
<div id="references">
5656
<div class="link-container">
5757
<a id="npm-link" target="_blank"
58-
href="https://www.npmjs.com/package/react-json-view">
58+
href="https://www.npmjs.com/package/@microlink/react-json-view">
5959
<img src="https://upload.wikimedia.org/wikipedia/commons/d/db/Npm-logo.svg"/>
6060
</a>
6161
</div>
6262
<div class="link-container">
6363
<a id="github-link" target="_blank"
64-
href="https://github.com/mac-s-g/react-json-view">
64+
href="https://github.com/microlinkhq/react-json-view">
6565
<img src="https://cdn4.iconfinder.com/data/icons/iconsimple-logotypes/512/github-512.png"/>
6666
</a>
6767
</div>

demo/dist/main.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/js/components/Demo.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ class Demo extends React.PureComponent {
6161
<div class="header-2">component demo</div>
6262
<img
6363
class="rjv-logo"
64-
src="https://github.com/mac-s-g/react-json-view/blob/master/doc/rjv-icon-alt.png?raw=true"
64+
src="https://raw.githubusercontent.com/microlinkhq/react-json-view/master/doc/rjv-icon-alt.png"
6565
onClick={() => {
6666
window.open(
67-
'https://github.com/mac-s-g/react-json-view',
67+
'https://github.com/microlinkhq/react-json-view',
6868
'_blank'
6969
);
7070
}}
7171
/>
7272
<GitHubButton
7373
type="stargazers"
74-
namespace="mac-s-g"
74+
namespace="microlinkhq"
7575
repo="react-json-view"
7676
/>
7777
</div>

docker/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ for example, the container used with this project has the following composition:
5959

6060
the `Dockerfile` defines exactly how a container should be composed for an application. Any docker-integrated workflow starts here.
6161

62-
Here is the [RJV Dockerfile](https://github.com/mac-s-g/react-json-view/blob/master/Dockerfile)
62+
Here is the [RJV Dockerfile](https://github.com/microlinkhq/react-json-view/blob/master/Dockerfile)
6363

64-
Notice [here](https://github.com/mac-s-g/react-json-view/blob/master/Dockerfile#L1) that my container is built on top of a node container. If you track down that node container on docker-hub, you'll see that it's built on top of a debian container. Also notice that `node_modules` are installed directly into my container [here](https://github.com/mac-s-g/react-json-view/blob/master/Dockerfile#L6-L7).
64+
Notice [here](https://github.com/microlinkhq/react-json-view/blob/master/Dockerfile#L1) that my container is built on top of a node container. If you track down that node container on docker-hub, you'll see that it's built on top of a debian container. Also notice that `node_modules` are installed directly into my container [here](https://github.com/microlinkhq/react-json-view/blob/master/Dockerfile#L6-L7).
6565

6666
When I run `./docker/build-container.sh`, docker produces a container including all the `node_modules` listed in my `package.json` file.
6767

6868
When I run `./docker/dev-server.sh`, a few things happen:
69-
1. docker [runs my container and mounts some source files](https://github.com/mac-s-g/react-json-view/blob/master/docker/dev-server.sh#L16-L20) into the container
69+
1. docker [runs my container and mounts some source files](https://github.com/microlinkhq/react-json-view/blob/master/docker/dev-server.sh#L16-L20) into the container
7070
* "mounting" is like a soft copy. my files are linked inside the container's file system so local edits propagate to the container.
71-
2. docker [exposes a port](https://github.com/mac-s-g/react-json-view/blob/master/docker/dev-server.sh#L23) on the container
71+
2. docker [exposes a port](https://github.com/microlinkhq/react-json-view/blob/master/docker/dev-server.sh#L23) on the container
7272
* this allows me to configure my app to listen and respond to to traffic at http://localhost:2000
7373
* the port is arbitrary
74-
3. An [entrypoint will be invoked](https://github.com/mac-s-g/react-json-view/blob/master/docker/dev-server.sh#L24) once the container is running
75-
* With my container up and running, the [entrypoint simply runs webpack dev server](https://github.com/mac-s-g/react-json-view/blob/master/entrypoints/dev-server.sh#L6).
74+
3. An [entrypoint will be invoked](https://github.com/microlinkhq/react-json-view/blob/master/docker/dev-server.sh#L24) once the container is running
75+
* With my container up and running, the [entrypoint simply runs webpack dev server](https://github.com/microlinkhq/react-json-view/blob/master/entrypoints/dev-server.sh#L6).
7676

7777
If you understand those steps, then you'll understand any of the docker scripts in `/docker/`. They do the same thing as the dev-server script but call different entrypoints.
7878

0 commit comments

Comments
 (0)