You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for considering contributing to Rodux! This guide has a few tips and guidelines to make contributing to the project as easy as possible.
3
+
4
+
## Bug Reports
5
+
Any bugs (or things that look like bugs) can be reported on the [GitHub issue tracker](https://github.com/Roblox/Rodux/issues).
6
+
7
+
Make sure you check to see if someone has already reported your bug first! Don't fret about it; if we notice a duplicate we'll send you a link to the right issue!
8
+
9
+
## Feature Requests
10
+
If there are any features you think are missing from Rodux, you can post a request in the [GitHub issue tracker](https://github.com/Roblox/Rodux/issues).
11
+
12
+
Just like bug reports, take a peak at the issue tracker for duplicates before opening a new feature request.
Once you have all of these installed, you can run the `install-dependencies` script to grab a couple additional local dependencies automatically.
23
+
24
+
Finally, you can run all of Rodux's tests with:
25
+
26
+
```sh
27
+
lua spec.lua
28
+
```
29
+
30
+
Or, to generate a LuaCov coverage report:
31
+
32
+
```sh
33
+
lua -lluacov spec.lua
34
+
luacov
35
+
```
36
+
37
+
## Pull Requests
38
+
Before starting a pull request, open an issue about the feature or bug. This helps us prevent duplicated and wasted effort. These issues are a great place to ask for help if you run into problems!
39
+
40
+
Before you submit a new pull request, check:
41
+
* Code Style: Match the existing code!
42
+
* Changelog: Add an entry to [CHANGELOG.md](CHANGELOG.md)
43
+
* Luacheck: Run [Luacheck](https://github.com/mpeterv/luacheck) on your code, no warnings allowed!
44
+
* Tests: They all need to pass!
45
+
46
+
### Code Style
47
+
Try to match the existing code style! In short:
48
+
49
+
* Tabs for indentation
50
+
* Double quotes
51
+
* One statement per line
52
+
53
+
Eventually we'll have a tool to check these things automatically.
54
+
55
+
### Changelog
56
+
Adding an entry to [CHANGELOG.md](CHANGELOG.md) alongside your commit makes it easier for everyone to keep track of what's been changed.
57
+
58
+
Add a line under the "Current master" heading. When we make a new release, all of those bullet points will be attached to a new version and the "Current master" section will become empty again.
59
+
60
+
### Luacheck
61
+
We use [Luacheck](https://github.com/mpeterv/luacheck) for static analysis of Lua on all of our projects.
62
+
63
+
From the command line, just run `luacheck lib` to check the Rodux source.
64
+
65
+
You should get it working on your system, and then get a plugin for the editor you use. There are plugins available for most popular editors!
66
+
67
+
### Tests
68
+
When submitting a bug fix, create a test that verifies the broken behavior and that the bug fix works. This helps us avoid regressions!
69
+
70
+
When submitting a new feature, add tests for all functionality.
71
+
72
+
We use [LuaCov](https://keplerproject.github.io/luacov) for keeping track of code coverage. We'd like it to be as close to 100% as possible, but it's not always easy.
@@ -32,9 +32,40 @@ This installation script is generated by a tool called [rbxpacker](https://githu
32
32
* Use a plugin like [rbxfs](https://github.com/LPGhatguy/rbxfs) to sync the files into a place
33
33
34
34
## Usage
35
-
TODO
35
+
Rodux works just like [Redux](https://redux.js.org)'s base API with the addition of [Redux Thunk](https://github.com/gaearon/redux-thunk) for simple side effects.
36
36
37
-
## License
38
-
Rodux is available under the Apache 2.0 license. See [LICENSE](LICENSE) for details.
37
+
Documentation is currently in progress!
38
+
39
+
```lua
40
+
localRodux=require(script.Parent.Rodux)
41
+
42
+
localfunctionreducer(state, action)
43
+
state=stateor {
44
+
frobulations=0,
45
+
}
46
+
47
+
ifaction.type=="frobulate" then
48
+
return {
49
+
frobulations=state.frobulations+1,
50
+
}
51
+
end
52
+
53
+
returnstate
54
+
end
55
+
56
+
localstore=Rodux.store.new(reducer)
39
57
40
-
For easy distribution, the license is duplicated in [lib/LICENSE.lua](lib/LICENSE.lua).
58
+
store:getState() -- { frobulations = 0 }
59
+
60
+
store:dispatch({
61
+
type="frobulate",
62
+
})
63
+
64
+
store:getState() -- { frobulations = 1 }
65
+
```
66
+
67
+
## Contributing
68
+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for information.
69
+
70
+
## License
71
+
Rodux is available under the Apache 2.0 license. See [LICENSE](LICENSE) for details.
0 commit comments