Skip to content

Commit 81d39eb

Browse files
feat: UNT-T31323: Init redux saga dev tool for expo
0 parents  commit 81d39eb

30 files changed

+38834
-0
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true

.eslintrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// @generated by expo-module-scripts
2+
module.exports = require('expo-module-scripts/eslintrc.base.js');

.github/workflows/publish.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: '🚀 Publish'
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: 🚀 Publish
11+
runs-on: macos-13
12+
steps:
13+
- name: 📚 checkout
14+
uses: actions/[email protected]
15+
- name: 🟢 node
16+
uses: actions/[email protected]
17+
with:
18+
node-version: 18
19+
registry-url: https://registry.npmjs.org
20+
- name: 🚀 Build & Publish
21+
run: yarn install && cd webui && yarn install && yarn run export && cd .. && yarn build && yarn publish --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.gitignore

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Diagnostic reports (https://nodejs.org/api/report.html)
7+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
8+
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
*.pid.lock
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage
17+
*.lcov
18+
19+
# Dependency directories
20+
node_modules/
21+
22+
# TypeScript cache
23+
*.tsbuildinfo
24+
25+
# Optional npm cache directory
26+
.npm
27+
28+
# Optional eslint cache
29+
.eslintcache
30+
31+
# Optional REPL history
32+
.node_repl_history
33+
34+
# Output of 'npm pack'
35+
*.tgz
36+
37+
# dotenv environment variable files
38+
.env
39+
40+
# Build files
41+
build/
42+
dist/
43+
.expo/
44+
45+
*.DS_Store

LICENCE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2024 Matthew Oakes
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# redux-saga-devtools-expo-dev-plugin
2+
3+
A React Native Redux Saga DevTool that can run in an Expo App
4+
5+
# Installation
6+
7+
### Add the package to your project
8+
9+
```
10+
npx expo install redux-saga-devtools-expo-dev-plugin
11+
```
12+
13+
### Integrate redux saga with the DevTool hook
14+
15+
```jsx
16+
import createSagaMiddleware from 'redux-saga';
17+
18+
let sagaMiddleware = createSagaMiddleware();
19+
if (__DEV__) {
20+
// eslint-disable-next-line @typescript-eslint/no-var-requires
21+
const { createSagaMonitor } = require('redux-saga-devtools-expo-dev-plugin');
22+
sagaMiddleware = createSagaMiddleware({ sagaMonitor: createSagaMonitor() });
23+
}
24+
25+
const store = configureStore({
26+
reducer: rootReducer,
27+
devTools: false,
28+
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(sagaMiddleware),
29+
});
30+
```

babel.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// @generated by expo-module-scripts
2+
module.exports = require('expo-module-scripts/babel.config.base');

expo-module.config.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"platforms": ["devtools"],
3+
"devtools": {
4+
"webpageRoot": "dist"
5+
}
6+
}

0 commit comments

Comments
 (0)