Skip to content

Commit

Permalink
redux-interop -> redux
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrHoroshih committed Dec 12, 2023
1 parent 79575cb commit 7bbaee6
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion apps/website/docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default defineConfig({
{ text: 'i18next', link: '/i18next/' },
{ text: 'web-api', link: '/web-api/' },
{ text: 'factories', link: '/factories/' },
{ text: 'Effector <-> Redux interop', link: '/redux-interop/' },
{ text: 'Effector <-> Redux interop', link: '/redux/' },
],
},
{ text: 'Magazine', link: '/magazine/' },
Expand Down
2 changes: 1 addition & 1 deletion apps/website/docs/magazine/migration_from_redux.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ E.g. you can read [Effector-related terminology here](https://effector.dev/en/ex

This guide uses the `@withease/redux` package, which is a minimalistic set of helpers to simplify the migration, so it is recommended to install it too.

See [the package documentation](/redux-interop/) for detailed installation instructions.
See [the package documentation](/redux/) for detailed installation instructions.

### Create Redux interoperability object

Expand Down
File renamed without changes.
11 changes: 0 additions & 11 deletions packages/redux-interop/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/redux-interop/src/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions packages/redux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# redux

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build redux` to build the library.

## Running unit tests

Run `nx test redux` to execute the unit tests via [Jest](https://jestjs.io).
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"name": "redux-interop",
"name": "redux",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/redux-interop/src",
"sourceRoot": "packages/redux/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nx/rollup:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/redux-interop",
"main": "packages/redux-interop/src/index.ts",
"tsConfig": "packages/redux-interop/tsconfig.lib.json",
"outputPath": "dist/packages/redux",
"main": "packages/redux/src/index.ts",
"tsConfig": "packages/redux/tsconfig.lib.json",
"assets": [],
"project": "packages/redux-interop/package.json",
"project": "packages/redux/package.json",
"compiler": "swc"
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/redux-interop/**/*.ts"]
"lintFilePatterns": ["packages/redux/**/*.ts"]
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["coverage/packages/redux-interop"],
"outputs": ["coverage/packages/redux"],
"options": {
"passWithNoTests": true
}
Expand Down
1 change: 1 addition & 0 deletions packages/redux/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/redux';
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createReduxInterop } from './redux-interop';
import { createReduxInterop } from './redux';
import { legacy_createStore } from 'redux';
import { configureStore, createSlice } from '@reduxjs/toolkit';
import { createEvent, fork, allSettled, createStore, sample } from 'effector';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ export function createReduxInterop<

const $store = createStore(reduxStore, {
serialize: 'ignore',
name: 'redux-interop/$store',
name: 'redux/$store',
});

const stateUpdated = createEvent<State & Ext>();

const $state = createStore<State & Ext>(reduxStore.getState(), {
serialize: 'ignore',
name: 'redux-interop/$state',
name: 'redux/$state',
skipVoid: false,
}).on(stateUpdated, (_, state) => state);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineConfig } from 'vite';
import viteTsConfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
cacheDir: '../../node_modules/.vite/redux-interop',
cacheDir: '../../node_modules/.vite/redux',

plugins: [
viteTsConfigPaths({
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"paths": {
"@withease/factories": ["packages/factories/index.ts"],
"@withease/i18next": ["packages/i18next/index.ts"],
"@withease/redux": ["packages/redux-interop/src/index.ts"],
"@withease/redux": ["packages/redux/src/index.ts"],
"@withease/web-api": ["packages/web-api/index.ts"]
}
},
Expand Down

0 comments on commit 7bbaee6

Please sign in to comment.