Skip to content

Commit fe09e19

Browse files
Merge pull request #13 from Jefreesujit/develop
Next Release v0.2.0
2 parents 9e0a975 + 788bd49 commit fe09e19

Some content is hidden

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

42 files changed

+8772
-4998
lines changed

.babelrc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
{
2-
"presets": ["es2015", "react"],
3-
"plugins": [
4-
"transform-decorators-legacy",
5-
"transform-class-properties",
6-
"transform-object-rest-spread"
7-
],
2+
"presets": ["env", "react", "stage-2"],
83
"env": {
4+
"browser": true,
95
"test": {
10-
"plugins": ["istanbul"]
6+
"presets": [["env"], "react"]
117
}
12-
}
13-
}
8+
},
9+
"plugins": ["transform-object-rest-spread"]
10+
}

.eslintrc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"parser": "babel-eslint",
3+
"parserOptions": {
4+
"ecmaFeatures": {
5+
"jsx": true
6+
}
7+
},
8+
"plugins": ["prettier"],
9+
"extends": [
10+
"airbnb",
11+
"prettier",
12+
"plugin:prettier/recommended"
13+
],
14+
"rules": {
15+
"prefer-destructuring": 0,
16+
"no-console": 0,
17+
"react/no-unused-prop-types": 0,
18+
"react/prefer-stateless-function": 0,
19+
"react/jsx-filename-extension": 0,
20+
"react/forbid-prop-types": 0,
21+
"react/require-default-props": 0,
22+
"comma-dangle": 0,
23+
"space-before-function-paren": [0, {
24+
"anonymous": "always",
25+
"named": "always",
26+
"asyncArrow": "always"
27+
}],
28+
"no-underscore-dangle": 0,
29+
"import/prefer-default-export": 0,
30+
"object-curly-newline": 0,
31+
"jsx-a11y/anchor-is-valid": 0,
32+
"arrow-body-style": 0,
33+
"react/no-array-index-key": 0,
34+
"consistent-return": 0,
35+
"no-return-assign": 0,
36+
"jsx-a11y/no-autofocus": 0,
37+
"jsx-a11y/tabindex-no-positive": 0,
38+
"prettier/prettier": "error",
39+
"import/no-extraneous-dependencies": 0,
40+
"react/jsx-one-expression-per-line": 0,
41+
"react/prop-types": 0,
42+
"jsx-a11y/label-has-for": [ 2, {
43+
"components": [ "Label" ],
44+
"required": {
45+
"every": [ "id" ]
46+
},
47+
"allowChildren": false
48+
}]
49+
},
50+
"env": {
51+
"browser": true,
52+
"node": true
53+
}
54+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,17 @@ about: Create a report to help us improve
88
A clear and concise description of what the bug is.
99

1010
**To Reproduce**
11-
Steps to reproduce the behavior:
12-
1. Go to '...'
13-
2. Click on '....'
14-
3. Scroll down to '....'
15-
4. See error
11+
Steps to reproduce the behavior
1612

1713
**Expected behavior**
1814
A clear and concise description of what you expected to happen.
1915

2016
**Screenshots**
2117
If applicable, add screenshots to help explain your problem.
2218

23-
**Desktop (please complete the following information):**
24-
- OS: [e.g. iOS]
25-
- Browser [e.g. chrome, safari]
26-
- Version [e.g. 22]
27-
28-
**Smartphone (please complete the following information):**
29-
- Device: [e.g. iPhone6]
30-
- OS: [e.g. iOS8.1]
31-
- Browser [e.g. stock browser, safari]
32-
- Version [e.g. 22]
19+
**Desktop (if applicable please complete the following information):**
20+
- OS: [e.g. OSX]
21+
- Version [e.g. High Sierra 10.13.5]
3322

3423
**Additional context**
3524
Add any other context about the problem here.

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
.DS_Store
22
node_modules
3-
example/index.build.js
3+
index.build.js
4+
es
5+
umd
6+
/*.js
7+
!setupTests.js
8+
!*.config.js

.npmignore

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

.travis.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
language: node_js
22
node_js:
3-
- "8"
4-
- "6"
5-
script:
6-
- npm run build
3+
- '8'
4+
jobs:
5+
include:
6+
- stage: lint
7+
script:
8+
- npm run lint
9+
- stage: build and test
10+
before_script:
11+
- npm install -g babel-cli rollup
12+
script:
13+
- npm run build
14+
- npm run test
15+
deploy:
16+
provider: npm
17+
email: jefree.sujit@gmail.com
18+
api_key:
19+
secure: BrBdcCxXWJwvcHyfXPp5d8aIfj4IgZoej61w0Jh42XJuku52ODggJyEzZWX8WWf97oefopw0wW5AuxBAOOqiamk3p8ASMbNV5yK8y0E4RPS8ECouUJ4ZXNBiO243P32mizQBExa1SEarrH2o7keBSgWLF0Rd9dvHJPhuq9YhE9YziZZB/FrXNbblM5lYbShRKZ7kajADW9EWYO3DHai179B8QWBdQEU+y8Y0d6Knmg7szJorH0HYX9Wj3kN3+hAXnTk+21cDVtmLsGjl/6W1RQ9AVsJEBk/RfLgpAqGhFIUdX/1Ff0sKPp39LWvtJBiDF9src/M/Y2HSPPhgcO6ACPBb5ko5tZTXfaDvhwvOUm/qBnK4bl/9A4/SMfpBWyxfnKeRcW+iEK8qurxGVcPj86BN8dwLBrdff9v+RI+/lQvq+oEPbkXLdtsYRhRHtv7k4i2lPKjz/+ms98jVk/XJOe83yB78Eky5JBhmT+0tNpVV/IdAu/XgptCudIPfwfnzMPWc+p7FpQ+Q5ssMvY3tILdg83vBgA4qA7AMOJ7+uTSR+14L7J8FlUeTLYOfzjq3sxvC5T2+6QXG9XpjxT+1gJveze5gYu9QBc3MmKWNykyR61maxIQEm1Va71tVtCQrqID9RXq7KxBLIA7Z1LHfuR9ON86dqNs3Xnn5pJTXGgs=
20+
on:
21+
tags: true
22+
repo: Jefreesujit/react-context-redux
23+
branch: master
24+
skip_cleanup: true

BUILDING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Building and Running Locally
2+
3+
react-context-redux is very simple to setup and start contributing.
4+
5+
Dependencies:
6+
7+
* Node.js
8+
* babel-cli: ^6.26.3 (Global)
9+
* rollup: ^0.62.0 (Global)
10+
11+
Once you have the above installed, you are good to go.
12+
13+
## Installing the required packages.
14+
15+
Make sure to run `npm i` on the root folder of react-context-redux repo.
16+
17+
## Building the package.
18+
19+
Once you have made the changes and ready to build and test, run `npm run build` to build the production artifacts.
20+
21+
While developing you can use `npm run watch`. This will watch the `src` folder and build things whenever a file is saved.
22+
23+
## Building the example.
24+
25+
Example can be built by running `npm run build:example`

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at e.jefree110@gmail.com or a.p.dhanushu@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing to react-context-redux
2+
3+
Contributions to react-context-redux include code, documentation, answering user questions and advocating for all types of users.
4+
5+
The react-context-redux project welcomes all contributions from anyone willing to work in
6+
good faith with other contributors and the community. No contribution is too
7+
small and all contributions are valued.
8+
9+
This guide explains the process for contributing to the react-context-redux project's core
10+
`Jefreesujit/react-context-redux` GitHub Repository and describes what to expect at each step.
11+
12+
## [Code of Conduct](./CODE_OF_CONDUCT.md)
13+
14+
The react-context-redux project has a
15+
[Code of Conduct](https://github.com/Jefreesujit/react-context-redux/blob/master/CODE_OF_CONDUCT.md)
16+
that *all* contributors are expected to follow. This code describes the
17+
*minimum* behavior expectations for all contributors.
18+
19+
See [details on our policy on Code of Conduct](https://github.com/Jefreesujit/react-context-redux/blob/master/CODE_OF_CONDUCT.md).
20+
21+
## [Issues](./doc/guides/contributing/issues.md)
22+
23+
Issues in react-context-redux are the primary means by which bug reports and
24+
general discussions are made.
25+
26+
* [How to Contribute in Issues](./doc/guides/contributing/issues.md#how-to-contribute-in-issues)
27+
* [Asking for General Help](./doc/guides/contributing/issues.md#asking-for-general-help)
28+
* [Discussing non-technical topics](./doc/guides/contributing/issues.md#discussing-non-technical-topics)
29+
* [Submitting a Bug Report](./doc/guides/contributing/issues.md#submitting-a-bug-report)
30+
* [Submitting a Bug Report](./doc/guides/contributing/issues.md#submitting-a-feature-request)
31+
* [Triaging a Bug Report](./doc/guides/contributing/issues.md#triaging-a-bug-report)
32+
* [Resolving a Bug Report](./doc/guides/contributing/issues.md#resolving-a-bug-report)
33+
34+
## [Pull Requests](./doc/guides/contributing/pull-requests.md)
35+
36+
Pull Requests are the way concrete changes are made to the code, documentation,
37+
dependencies, and tools contained in the `nodejs/node` repository.
38+
39+
* [Dependencies](./doc/guides/contributing/pull-requests.md#dependencies)
40+
* [Setting up your local environment](./doc/guides/contributing/pull-requests.md#setting-up-your-local-environment)
41+
* [The Process of Making Changes](./doc/guides/contributing/pull-requests.md#the-process-of-making-changes)
42+
* [Reviewing Pull Requests](./doc/guides/contributing/pull-requests.md#reviewing-pull-requests)
43+
44+
<a id="developers-certificate-of-origin"></a>
45+
## Developer's Certificate of Origin 1.1
46+
47+
By making a contribution to this project, I certify that:
48+
49+
* (a) The contribution was created in whole or in part by me and I
50+
have the right to submit it under the open source license
51+
indicated in the file; or
52+
53+
* (b) The contribution is based upon previous work that, to the best
54+
of my knowledge, is covered under an appropriate open source
55+
license and I have the right under that license to submit that
56+
work with modifications, whether created in whole or in part
57+
by me, under the same open source license (unless I am
58+
permitted to submit under a different license), as indicated
59+
in the file; or
60+
61+
* (c) The contribution was provided directly to me by some other
62+
person who certified (a), (b) or (c) and I have not modified
63+
it.
64+
65+
* (d) I understand and agree that this project and the contribution
66+
are public and that a record of the contribution (including all
67+
personal information I submit with it, including my sign-off) is
68+
maintained indefinitely and may be redistributed consistent with
69+
this project or the open source license(s) involved.

DOCUMENTATION.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
## Modules
2+
3+
<dl>
4+
<dt><a href="#module_connect">connect</a></dt>
5+
<dd></dd>
6+
<dt><a href="#module_createStore">createStore</a> ⇒ <code>Node</code> | <code>function</code></dt>
7+
<dd><p>Creates an global store.</p>
8+
</dd>
9+
<dt><a href="#module_provider">provider</a></dt>
10+
<dd></dd>
11+
</dl>
12+
13+
<a name="module_connect"></a>
14+
15+
## connect
16+
<a name="module_connect..actionCallback"></a>
17+
18+
### connect~actionCallback(actionCallback)
19+
To dispatch values to global store.
20+
21+
**Kind**: inner method of [<code>connect</code>](#module_connect)
22+
23+
| Param | Type | Description |
24+
| --- | --- | --- |
25+
| actionCallback | <code>function</code> | A function that receives dispatch function as a param |
26+
27+
<a name="module_createStore"></a>
28+
29+
## createStore ⇒ <code>Node</code> \| <code>function</code>
30+
Creates an global store.
31+
32+
**Returns**: <code>Node</code> - - Returns a wrapper provider component<code>function</code> - - A "connect" function to connect a component with global state
33+
34+
| Param | Type | Description |
35+
| --- | --- | --- |
36+
| defaultState | <code>Object</code> | The default state of the application need to create the store |
37+
38+
39+
* [createStore](#module_createStore) ⇒ <code>Node</code> \| <code>function</code>
40+
* [~dispatch(options)](#module_createStore..dispatch)
41+
* [~connect(select, component)](#module_createStore..connect) ⇒ <code>Node</code>
42+
43+
<a name="module_createStore..dispatch"></a>
44+
45+
### createStore~dispatch(options)
46+
To update values in global store.
47+
48+
**Kind**: inner method of [<code>createStore</code>](#module_createStore)
49+
50+
| Param | Type | Description |
51+
| --- | --- | --- |
52+
| options | <code>Object</code> | A object with the details to update values in global store |
53+
| options.key | <code>string</code> | KeyPath to which the value has to be assigned, separated by '.' |
54+
| options.payload | <code>Object</code> | Value to be set against the provided Keypath |
55+
56+
<a name="module_createStore..connect"></a>
57+
58+
### createStore~connect(select, component) ⇒ <code>Node</code>
59+
Connects the passed component with the global store.
60+
61+
**Kind**: inner method of [<code>createStore</code>](#module_createStore)
62+
**Returns**: <code>Node</code> - - A wrapper React element
63+
64+
| Param | Type | Description |
65+
| --- | --- | --- |
66+
| select | <code>function</code> | To map global state to props, should return an JSON object |
67+
| component | <code>Node</code> | A React element, to which the props has to be passed |
68+
69+
<a name="module_provider"></a>
70+
71+
## provider
72+
73+
* [provider](#module_provider)
74+
* [~Provider](#module_provider..Provider)
75+
* [new Provider()](#new_module_provider..Provider_new)
76+
77+
<a name="module_provider..Provider"></a>
78+
79+
### provider~Provider
80+
**Kind**: inner class of [<code>provider</code>](#module_provider)
81+
**Properties**
82+
83+
| Name | Type | Description |
84+
| --- | --- | --- |
85+
| defaultState | <code>object</code> | The default state of the application need to create the store, if not passed as part of createStore |
86+
| children | <code>Node</code> | React element for which the store should be made available |
87+
88+
<a name="new_module_provider..Provider_new"></a>
89+
90+
#### new Provider()
91+
Provider Component.
92+

0 commit comments

Comments
 (0)